All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 1/4] package/python-colorzero: new package
@ 2020-06-13 19:20 Peter Seiderer
  2020-06-13 19:20 ` [Buildroot] [PATCH v1 2/4] support/testing: add python-colorzero test Peter Seiderer
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Peter Seiderer @ 2020-06-13 19:20 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 DEVELOPERS                                     |  1 +
 package/Config.in                              |  1 +
 package/python-colorzero/Config.in             |  7 +++++++
 package/python-colorzero/python-colorzero.hash |  4 ++++
 package/python-colorzero/python-colorzero.mk   | 13 +++++++++++++
 5 files changed, 26 insertions(+)
 create mode 100644 package/python-colorzero/Config.in
 create mode 100644 package/python-colorzero/python-colorzero.hash
 create mode 100644 package/python-colorzero/python-colorzero.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 9a94307082..9cd7d373b6 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2023,6 +2023,7 @@ F:	package/iwd/
 F:	package/libevdev/
 F:	package/log4cplus/
 F:	package/postgresql/
+F:	package/python-colorzero/
 F:	package/qt5/
 F:	package/quotatool/
 F:	package/racehound/
diff --git a/package/Config.in b/package/Config.in
index b0a7da2f5c..502f917815 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -913,6 +913,7 @@ menu "External python modules"
 	source "package/python-coherence/Config.in"
 	source "package/python-colorama/Config.in"
 	source "package/python-colorlog/Config.in"
+	source "package/python-colorzero/Config.in"
 	source "package/python-configobj/Config.in"
 	source "package/python-configshell-fb/Config.in"
 	source "package/python-constantly/Config.in"
diff --git a/package/python-colorzero/Config.in b/package/python-colorzero/Config.in
new file mode 100644
index 0000000000..58af9f49e9
--- /dev/null
+++ b/package/python-colorzero/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_PYTHON_COLORZERO
+	bool "python-colorzero"
+	select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime
+	help
+	  A color manipulation library for Python.
+
+	  https://github.com/waveform80/colorzero
diff --git a/package/python-colorzero/python-colorzero.hash b/package/python-colorzero/python-colorzero.hash
new file mode 100644
index 0000000000..12be3bb46e
--- /dev/null
+++ b/package/python-colorzero/python-colorzero.hash
@@ -0,0 +1,4 @@
+# Locally computed
+sha256  24d30b55793150f9ae7478f8aa2126fe5598a31f928907eadbf9d5a19aa9964c  python-colorzero-release-1.1.tar.gz
+# Locally computed
+sha256  47778d78e05bb6c39c022814e3712a0327c6418c7251757e72167ab8ff12bb4d  LICENSE.txt
diff --git a/package/python-colorzero/python-colorzero.mk b/package/python-colorzero/python-colorzero.mk
new file mode 100644
index 0000000000..6ba421f89c
--- /dev/null
+++ b/package/python-colorzero/python-colorzero.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# python-colorzero
+#
+################################################################################
+
+PYTHON_COLORZERO_VERSION = release-1.1
+PYTHON_COLORZERO_SITE = $(call github,waveform80,colorzero,$(PYTHON_COLORZERO_VERSION))
+PYTHON_COLORZERO_LICENSE = BSD-3-Clause 
+PYTHON_COLORZERO_LICENSE_FILES = LICENSE.txt
+PYTHON_COLORZERO_SETUP_TYPE = setuptools
+
+$(eval $(python-package))
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v1 2/4] support/testing: add python-colorzero test
  2020-06-13 19:20 [Buildroot] [PATCH v1 1/4] package/python-colorzero: new package Peter Seiderer
@ 2020-06-13 19:20 ` Peter Seiderer
  2020-06-18 19:44   ` Thomas Petazzoni
  2020-06-13 19:20 ` [Buildroot] [PATCH v1 3/4] package/python-gpiozero: new package Peter Seiderer
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Peter Seiderer @ 2020-06-13 19:20 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 .../tests/package/sample_python_colorzero.py  |  8 +++++++
 .../tests/package/test_python_colorzero.py    | 23 +++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_colorzero.py
 create mode 100644 support/testing/tests/package/test_python_colorzero.py

diff --git a/support/testing/tests/package/sample_python_colorzero.py b/support/testing/tests/package/sample_python_colorzero.py
new file mode 100644
index 0000000000..23862a816d
--- /dev/null
+++ b/support/testing/tests/package/sample_python_colorzero.py
@@ -0,0 +1,8 @@
+from colorzero import Color
+
+red = Color('red')
+green = Color('lime')
+blue = Color('blue')
+assert(red.rgb == (1.0, 0.0, 0.0))
+assert(green.rgb == (0.0, 1.0, 0.0))
+assert(blue.rgb == (0.0, 0.0, 1.0))
diff --git a/support/testing/tests/package/test_python_colorzero.py b/support/testing/tests/package/test_python_colorzero.py
new file mode 100644
index 0000000000..b7c228ac3c
--- /dev/null
+++ b/support/testing/tests/package/test_python_colorzero.py
@@ -0,0 +1,23 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy2Colorzero(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON=y
+        BR2_PACKAGE_PYTHON_COLORZERO=y
+        """
+    sample_scripts = ["tests/package/sample_python_colorzero.py"]
+    timeout = 30
+
+
+class TestPythonPy3Colorzero(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_COLORZERO=y
+        """
+    sample_scripts = ["tests/package/sample_python_colorzero.py"]
+    timeout = 30
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v1 3/4] package/python-gpiozero: new package
  2020-06-13 19:20 [Buildroot] [PATCH v1 1/4] package/python-colorzero: new package Peter Seiderer
  2020-06-13 19:20 ` [Buildroot] [PATCH v1 2/4] support/testing: add python-colorzero test Peter Seiderer
@ 2020-06-13 19:20 ` Peter Seiderer
  2020-06-18 19:44   ` Thomas Petazzoni
  2020-06-13 19:20 ` [Buildroot] [PATCH v1 4/4] support/testing: add python-gpiozero test Peter Seiderer
  2020-06-18 19:44 ` [Buildroot] [PATCH v1 1/4] package/python-colorzero: new package Thomas Petazzoni
  3 siblings, 1 reply; 8+ messages in thread
From: Peter Seiderer @ 2020-06-13 19:20 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 DEVELOPERS                                   |  1 +
 package/Config.in                            |  1 +
 package/python-gpiozero/Config.in            |  9 +++++++++
 package/python-gpiozero/python-gpiozero.hash |  4 ++++
 package/python-gpiozero/python-gpiozero.mk   | 13 +++++++++++++
 5 files changed, 28 insertions(+)
 create mode 100644 package/python-gpiozero/Config.in
 create mode 100644 package/python-gpiozero/python-gpiozero.hash
 create mode 100644 package/python-gpiozero/python-gpiozero.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 9cd7d373b6..24babce128 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2024,6 +2024,7 @@ F:	package/libevdev/
 F:	package/log4cplus/
 F:	package/postgresql/
 F:	package/python-colorzero/
+F:	package/python-gpiozero/
 F:	package/qt5/
 F:	package/quotatool/
 F:	package/racehound/
diff --git a/package/Config.in b/package/Config.in
index 502f917815..8be605e752 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -968,6 +968,7 @@ menu "External python modules"
 	source "package/python-futures/Config.in"
 	source "package/python-gitdb2/Config.in"
 	source "package/python-gobject/Config.in"
+	source "package/python-gpiozero/Config.in"
 	source "package/python-greenlet/Config.in"
 	source "package/python-gunicorn/Config.in"
 	source "package/python-h2/Config.in"
diff --git a/package/python-gpiozero/Config.in b/package/python-gpiozero/Config.in
new file mode 100644
index 0000000000..1e2735be45
--- /dev/null
+++ b/package/python-gpiozero/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_PYTHON_GPIOZERO
+	bool "python-gpiozero"
+	depends on BR2_arm
+	select BR2_PACKAGE_PYTHON_COLORZERO # runtime
+	select BR2_PACKAGE_PYTHON_RPI_GPIO # runtime
+	help
+	  A simple interface to GPIO devices with Raspberry Pi.
+
+	  https://github.com/gpiozero/gpiozero
diff --git a/package/python-gpiozero/python-gpiozero.hash b/package/python-gpiozero/python-gpiozero.hash
new file mode 100644
index 0000000000..a1e66e590c
--- /dev/null
+++ b/package/python-gpiozero/python-gpiozero.hash
@@ -0,0 +1,4 @@
+# Locally computed
+sha256  8cb9824fe1b08e7935de03899455e20ce2c242e4cebb0c954c274c48059f6ea5  python-gpiozero-v1.5.1.tar.gz
+# Locally computed
+sha256  b6e26763b79d7904d6eaa66f7f53ae374cf30431bb6ba8bcb0d9d5ff56dc69e3  LICENSE.rst
diff --git a/package/python-gpiozero/python-gpiozero.mk b/package/python-gpiozero/python-gpiozero.mk
new file mode 100644
index 0000000000..71d0d43bb1
--- /dev/null
+++ b/package/python-gpiozero/python-gpiozero.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# python-gpiozero
+#
+################################################################################
+
+PYTHON_GPIOZERO_VERSION = v1.5.1
+PYTHON_GPIOZERO_SITE = $(call github,gpiozero,gpiozero,$(PYTHON_GPIOZERO_VERSION))
+PYTHON_GPIOZERO_LICENSE = BSD-3-Clause 
+PYTHON_GPIOZERO_LICENSE_FILES = LICENSE.rst
+PYTHON_GPIOZERO_SETUP_TYPE = setuptools
+
+$(eval $(python-package))
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v1 4/4] support/testing: add python-gpiozero test
  2020-06-13 19:20 [Buildroot] [PATCH v1 1/4] package/python-colorzero: new package Peter Seiderer
  2020-06-13 19:20 ` [Buildroot] [PATCH v1 2/4] support/testing: add python-colorzero test Peter Seiderer
  2020-06-13 19:20 ` [Buildroot] [PATCH v1 3/4] package/python-gpiozero: new package Peter Seiderer
@ 2020-06-13 19:20 ` Peter Seiderer
  2020-06-18 19:44   ` Thomas Petazzoni
  2020-06-18 19:44 ` [Buildroot] [PATCH v1 1/4] package/python-colorzero: new package Thomas Petazzoni
  3 siblings, 1 reply; 8+ messages in thread
From: Peter Seiderer @ 2020-06-13 19:20 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 .../tests/package/sample_python_gpiozero.py   |  5 +++
 .../tests/package/test_python_gpiozero.py     | 32 +++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_gpiozero.py
 create mode 100644 support/testing/tests/package/test_python_gpiozero.py

diff --git a/support/testing/tests/package/sample_python_gpiozero.py b/support/testing/tests/package/sample_python_gpiozero.py
new file mode 100644
index 0000000000..b95df07fe7
--- /dev/null
+++ b/support/testing/tests/package/sample_python_gpiozero.py
@@ -0,0 +1,5 @@
+from gpiozero import pi_info
+
+piBoardInfo = pi_info('a020d3')  # 3B+
+
+assert(piBoardInfo.model == '3B+')
diff --git a/support/testing/tests/package/test_python_gpiozero.py b/support/testing/tests/package/test_python_gpiozero.py
new file mode 100644
index 0000000000..2498a55514
--- /dev/null
+++ b/support/testing/tests/package/test_python_gpiozero.py
@@ -0,0 +1,32 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonGpiozero(TestPythonPackageBase):
+    config = TestPythonPackageBase.config
+    sample_scripts = ["tests/package/sample_python_gpiozero.py"]
+
+    def run_sample_scripts(self):
+        cmd = self.interpreter + " sample_python_gpiozero.py"
+        output, exit_code = self.emulator.run(cmd)
+        self.assertEqual(exit_code, 0)
+
+        cmd = "pinout -r a020d3 -m | cat"
+        self.assertRunOk(cmd)
+
+
+class TestPythonPy2Gpiozero(TestPythonGpiozero):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON=y
+        BR2_PACKAGE_PYTHON_GPIOZERO=y
+        """
+
+
+class TestPythonPy3Gpiozero(TestPythonGpiozero):
+    __test__ = True
+    config = TestPythonGpiozero.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_GPIOZERO=y
+        """
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v1 1/4] package/python-colorzero: new package
  2020-06-13 19:20 [Buildroot] [PATCH v1 1/4] package/python-colorzero: new package Peter Seiderer
                   ` (2 preceding siblings ...)
  2020-06-13 19:20 ` [Buildroot] [PATCH v1 4/4] support/testing: add python-gpiozero test Peter Seiderer
@ 2020-06-18 19:44 ` Thomas Petazzoni
  3 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2020-06-18 19:44 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 13 Jun 2020 21:20:31 +0200
Peter Seiderer <ps.report@gmx.net> wrote:

> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

I've applied, after doing some tweaks. See below.

> diff --git a/package/python-colorzero/Config.in b/package/python-colorzero/Config.in
> new file mode 100644
> index 0000000000..58af9f49e9
> --- /dev/null
> +++ b/package/python-colorzero/Config.in
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_PYTHON_COLORZERO
> +	bool "python-colorzero"
> +	select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime

I couldn't see any trace of setuptools being needed on the target at
runtime, neither in the setup.py, nor in the code, and I was able to
run your test cases without python-setuptools on the target. So I
dropped this.

> diff --git a/package/python-colorzero/python-colorzero.hash b/package/python-colorzero/python-colorzero.hash
> new file mode 100644
> index 0000000000..12be3bb46e
> --- /dev/null
> +++ b/package/python-colorzero/python-colorzero.hash
> @@ -0,0 +1,4 @@
> +# Locally computed
> +sha256  24d30b55793150f9ae7478f8aa2126fe5598a31f928907eadbf9d5a19aa9964c  python-colorzero-release-1.1.tar.gz
> +# Locally computed
> +sha256  47778d78e05bb6c39c022814e3712a0327c6418c7251757e72167ab8ff12bb4d  LICENSE.txt
> diff --git a/package/python-colorzero/python-colorzero.mk b/package/python-colorzero/python-colorzero.mk
> new file mode 100644
> index 0000000000..6ba421f89c
> --- /dev/null
> +++ b/package/python-colorzero/python-colorzero.mk
> @@ -0,0 +1,13 @@
> +################################################################################
> +#
> +# python-colorzero
> +#
> +################################################################################
> +
> +PYTHON_COLORZERO_VERSION = release-1.1
> +PYTHON_COLORZERO_SITE = $(call github,waveform80,colorzero,$(PYTHON_COLORZERO_VERSION))

We prefer this:

PYTHON_COLORZERO_VERSION = 1.1
PYTHON_COLORZERO_SITE = $(call github,waveform80,colorzero,release-$(PYTHON_COLORZERO_VERSION))

i.e, the VERSION field contains really just the version.

> +PYTHON_COLORZERO_LICENSE = BSD-3-Clause 

There was a trailing space on this line, reported by check-package.

I fixed those nits, and applied!

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v1 2/4] support/testing: add python-colorzero test
  2020-06-13 19:20 ` [Buildroot] [PATCH v1 2/4] support/testing: add python-colorzero test Peter Seiderer
@ 2020-06-18 19:44   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2020-06-18 19:44 UTC (permalink / raw)
  To: buildroot

On Sat, 13 Jun 2020 21:20:32 +0200
Peter Seiderer <ps.report@gmx.net> wrote:

> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
>  .../tests/package/sample_python_colorzero.py  |  8 +++++++
>  .../tests/package/test_python_colorzero.py    | 23 +++++++++++++++++++
>  2 files changed, 31 insertions(+)
>  create mode 100644 support/testing/tests/package/sample_python_colorzero.py
>  create mode 100644 support/testing/tests/package/test_python_colorzero.py

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v1 3/4] package/python-gpiozero: new package
  2020-06-13 19:20 ` [Buildroot] [PATCH v1 3/4] package/python-gpiozero: new package Peter Seiderer
@ 2020-06-18 19:44   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2020-06-18 19:44 UTC (permalink / raw)
  To: buildroot

On Sat, 13 Jun 2020 21:20:33 +0200
Peter Seiderer <ps.report@gmx.net> wrote:

> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

I've applied after doing some tweaks. See below.

> diff --git a/package/python-gpiozero/python-gpiozero.mk b/package/python-gpiozero/python-gpiozero.mk
> new file mode 100644
> index 0000000000..71d0d43bb1
> --- /dev/null
> +++ b/package/python-gpiozero/python-gpiozero.mk
> @@ -0,0 +1,13 @@
> +################################################################################
> +#
> +# python-gpiozero
> +#
> +################################################################################
> +
> +PYTHON_GPIOZERO_VERSION = v1.5.1

VERSION should have been just 1.5.1

> +PYTHON_GPIOZERO_SITE = $(call github,gpiozero,gpiozero,$(PYTHON_GPIOZERO_VERSION))
> +PYTHON_GPIOZERO_LICENSE = BSD-3-Clause 

Trailing space here.

Applied with those issues fixed. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v1 4/4] support/testing: add python-gpiozero test
  2020-06-13 19:20 ` [Buildroot] [PATCH v1 4/4] support/testing: add python-gpiozero test Peter Seiderer
@ 2020-06-18 19:44   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2020-06-18 19:44 UTC (permalink / raw)
  To: buildroot

On Sat, 13 Jun 2020 21:20:34 +0200
Peter Seiderer <ps.report@gmx.net> wrote:

> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
>  .../tests/package/sample_python_gpiozero.py   |  5 +++
>  .../tests/package/test_python_gpiozero.py     | 32 +++++++++++++++++++
>  2 files changed, 37 insertions(+)
>  create mode 100644 support/testing/tests/package/sample_python_gpiozero.py
>  create mode 100644 support/testing/tests/package/test_python_gpiozero.py

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-06-18 19:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-13 19:20 [Buildroot] [PATCH v1 1/4] package/python-colorzero: new package Peter Seiderer
2020-06-13 19:20 ` [Buildroot] [PATCH v1 2/4] support/testing: add python-colorzero test Peter Seiderer
2020-06-18 19:44   ` Thomas Petazzoni
2020-06-13 19:20 ` [Buildroot] [PATCH v1 3/4] package/python-gpiozero: new package Peter Seiderer
2020-06-18 19:44   ` Thomas Petazzoni
2020-06-13 19:20 ` [Buildroot] [PATCH v1 4/4] support/testing: add python-gpiozero test Peter Seiderer
2020-06-18 19:44   ` Thomas Petazzoni
2020-06-18 19:44 ` [Buildroot] [PATCH v1 1/4] package/python-colorzero: new package Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.