diff mbox

[V2] python: spidev: add spidev plugin to manage spi from userspace

Message ID 1425803293-25109-1-git-send-email-michael@amarulasolutions.com
State Accepted
Headers show

Commit Message

Michael Nazzareno Trimarchi March 8, 2015, 8:28 a.m. UTC
Cc: Yegor Yefremov <yegorslists@googlemail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>

---

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

Comments

Thomas Petazzoni March 9, 2015, 1:33 p.m. UTC | #1
Dear Michael Trimarchi,

On Sun,  8 Mar 2015 09:28:13 +0100, Michael Trimarchi wrote:

> +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
Michael Nazzareno Trimarchi March 9, 2015, 1:53 p.m. UTC | #2
Hi

On Mon, Mar 9, 2015 at 2:33 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Michael Trimarchi,
>
> On Sun,  8 Mar 2015 09:28:13 +0100, Michael Trimarchi wrote:
>
>> +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.
>

Sorry, I will do better next time

Michael


> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
Thomas Petazzoni March 9, 2015, 2:32 p.m. UTC | #3
Dear Michael Trimarchi,

On Mon, 9 Mar 2015 14:53:17 +0100, Michael Trimarchi wrote:

> 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
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 584887b..8814a07 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/python-spidev/Config.in b/package/python-spidev/Config.in
new file mode 100644
index 0000000..8540d55
--- /dev/null
+++ b/package/python-spidev/Config.in
@@ -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
diff --git a/package/python-spidev/python-spidev.mk b/package/python-spidev/python-spidev.mk
new file mode 100644
index 0000000..b6e1fce
--- /dev/null
+++ b/package/python-spidev/python-spidev.mk
@@ -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))