Skip to contentSkip to conversation

python: spidev: add spidev plugin to manage spi from userspace

PATCH Superseded Michael Trimarchi 2 participants 4 messages Mar 8, 2015 – Mar 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 python: spidev: add spidev plugin to manage spi from userspace

---

Changes for V2:
- this package supports both Python 2.x and 3.x.
Remove depends on BR2_PACKAGE_PYTHON.

---
 package/Config.in                      |  1 +
 package/python-spidev/Config.in        |  7 +++++++
 package/python-spidev/python-spidev.mk | 14 ++++++++++++++
 3 files changed, 22 insertions(+)
 create mode 100644 package/python-spidev/Config.in
 create mode 100644 package/python-spidev/python-spidev.mk
package/Config.in +1 -0
index 584887b..8814a07 100644
@@ -576,6 +576,7 @@ menu "external python modules"
 	source "package/python-setuptools/Config.in"
 	source "package/python-simplejson/Config.in"
 	source "package/python-six/Config.in"
+	source "package/python-spidev/Config.in"
 	source "package/python-thrift/Config.in"
 	source "package/python-tornado/Config.in"
 	source "package/python-twisted/Config.in"
package/python-spidev/Config.in new file +7 -0
new file mode 100644
index 0000000..8540d55
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_PYTHON_SPIDEV
+	bool "python-spidev"
+	help
+	  Python module for interfacing with SPI devices from user
+	  space via the spidev linux kernel driver.
+
+	  https://pypi.python.org/pypi/spidev
package/python-spidev/python-spidev.mk new file +14 -0
new file mode 100644
index 0000000..b6e1fce
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-spidev
+#
+################################################################################
+
+PYTHON_SPIDEV_VERSION = 3.0
+PYTHON_SPIDEV_SOURCE = spidev-$(PYTHON_SPIDEV_VERSION).tar.gz
+PYTHON_SPIDEV_SITE = https://pypi.python.org/packages/source/s/spidev
+PYTHON_SPIDEV_SETUP_TYPE = distutils
+PYTHON_SPIDEV_LICENSE = GPLv2
+PYTHON_SPIDEV_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 python: spidev: add spidev plugin to manage spi from userspace

Dear Michael Trimarchi,

package/python-spidev/python-spidev.mk line 12

Quoted 6 lines · Michael Trimarchi
package/python-spidev/python-spidev.mk new file +6 -0
+PYTHON_SPIDEV_VERSION = 3.0
+PYTHON_SPIDEV_SOURCE = spidev-$(PYTHON_SPIDEV_VERSION).tar.gz
+PYTHON_SPIDEV_SITE = https://pypi.python.org/packages/source/s/spidev
+PYTHON_SPIDEV_SETUP_TYPE = distutils
+PYTHON_SPIDEV_LICENSE = GPLv2
+PYTHON_SPIDEV_LICENSE_FILES = LICENSE

There is no file named "LICENSE" in the source code of python-spidev. The file is named LICENSE.md.

Also, the commit title for new package should normally be:

<pkgname>: new package

so in this case:

python-spidev: new package

I've fixed those issues (especially the license file one), and applied your patch.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 python: spidev: add spidev plugin to manage spi from userspace

Hi

Quoted 16 lines · Thomas Petazzoni

Dear Michael Trimarchi,

package/python-spidev/python-spidev.mk line 12

Quoted 6 lines · Michael Trimarchi
package/python-spidev/python-spidev.mk new file +6 -0
+PYTHON_SPIDEV_VERSION = 3.0
+PYTHON_SPIDEV_SOURCE = spidev-$(PYTHON_SPIDEV_VERSION).tar.gz
+PYTHON_SPIDEV_SITE = https://pypi.python.org/packages/source/s/spidev
+PYTHON_SPIDEV_SETUP_TYPE = distutils
+PYTHON_SPIDEV_LICENSE = GPLv2
+PYTHON_SPIDEV_LICENSE_FILES = LICENSE

There is no file named "LICENSE" in the source code of python-spidev. The file is named LICENSE.md.

Also, the commit title for new package should normally be:

Quoted 9 lines

<pkgname>: new package

so in this case:

python-spidev: new package

I've fixed those issues (especially the license file one), and applied your patch.

Sorry, I will do better next time

Michael

Quoted 7 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Signature · 4 lines
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |
#3 lore raw

PATCH v2 1/1 python: spidev: add spidev plugin to manage spi from userspace

Dear Michael Trimarchi,

Quoted 1 line · Michael Trimarchi

Sorry, I will do better next time

No problem at all. Your contributions are very welcome. I don't mind fixing minor issues like that one, especially when they are made by new contributors. There is obviously a learning curve to get all the details.

Thanks again!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com