package/python-colorzero: new package
PATCH 1/4 package/python-colorzero: new package
--- 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
DEVELOPERS +1 -0
@@ -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/
package/Config.in +1 -0
@@ -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"
package/python-colorzero/Config.in new file +7 -0
@@ -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
package/python-colorzero/python-colorzero.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally computed +sha256 24d30b55793150f9ae7478f8aa2126fe5598a31f928907eadbf9d5a19aa9964c python-colorzero-release-1.1.tar.gz +# Locally computed +sha256 47778d78e05bb6c39c022814e3712a0327c6418c7251757e72167ab8ff12bb4d LICENSE.txt
package/python-colorzero/python-colorzero.mk new file +13 -0
@@ -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))
Signature · 1 line
2.27.0
PATCH 2/4 support/testing: add python-colorzero test
--- .../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
support/testing/tests/package/sample_python_colorzero.py new file +8 -0
@@ -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))
support/testing/tests/package/test_python_colorzero.py new file +23 -0
@@ -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
Signature · 1 line
2.27.0
Thomas Petazzoni
AppliedPATCH 2/4 support/testing: add python-colorzero test
Quoted 7 lines · On Sat, 13 Jun 2020 21:20:32 +0200 Peter Seiderer <[email protected]> wrote:
Signed-off-by Peter Seiderer <[email protected]>--- .../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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 3/4 package/python-gpiozero: new package
In reply to Peter Seiderer--- 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
DEVELOPERS +1 -0
@@ -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/
package/Config.in +1 -0
@@ -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"
package/python-gpiozero/Config.in new file +9 -0
@@ -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
package/python-gpiozero/python-gpiozero.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally computed +sha256 8cb9824fe1b08e7935de03899455e20ce2c242e4cebb0c954c274c48059f6ea5 python-gpiozero-v1.5.1.tar.gz +# Locally computed +sha256 b6e26763b79d7904d6eaa66f7f53ae374cf30431bb6ba8bcb0d9d5ff56dc69e3 LICENSE.rst
package/python-gpiozero/python-gpiozero.mk new file +13 -0
@@ -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))
Signature · 1 line
2.27.0
PATCH 3/4 package/python-gpiozero: new package
Quoted 1 line · On Sat, 13 Jun 2020 21:20:33 +0200 Peter Seiderer <[email protected]> wrote:
Signed-off-by Peter Seiderer <[email protected]>
I've applied after doing some tweaks. See below.
package/python-gpiozero/python-gpiozero.mk line 7
Quoted 13 lines
package/python-gpiozero/python-gpiozero.mk new file +7
-0@@ -0,0 +1,13 @@ +################################################################################ +# +# python-gpiozero +# +################################################################################ + +PYTHON_GPIOZERO_VERSION = v1.5.1
VERSION should have been just 1.5.1
package/python-gpiozero/python-gpiozero.mk line 9
Quoted 2 lines
package/python-gpiozero/python-gpiozero.mk new file +2
-0+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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 4/4 support/testing: add python-gpiozero test
In reply to Peter Seiderer--- .../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
support/testing/tests/package/sample_python_gpiozero.py new file +5 -0
@@ -0,0 +1,5 @@ +from gpiozero import pi_info + +piBoardInfo = pi_info('a020d3') # 3B+ + +assert(piBoardInfo.model == '3B+')
support/testing/tests/package/test_python_gpiozero.py new file +32 -0
@@ -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 + """
Signature · 1 line
2.27.0
Thomas Petazzoni
AppliedPATCH 4/4 support/testing: add python-gpiozero test
Quoted 7 lines · On Sat, 13 Jun 2020 21:20:34 +0200 Peter Seiderer <[email protected]> wrote:
Signed-off-by Peter Seiderer <[email protected]>--- .../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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/4 package/python-colorzero: new package
In reply to Peter SeidererHello,
Quoted 1 line · On Sat, 13 Jun 2020 21:20:31 +0200 Peter Seiderer <[email protected]> wrote:
Signed-off-by Peter Seiderer <[email protected]>
I've applied, after doing some tweaks. See below.
package/python-colorzero/Config.in line 3
Quoted 9 lines
package/python-colorzero/Config.in new file +3
-0@@ -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.
Quoted 16 lines
package/python-colorzero/python-colorzero.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally computed +sha256 24d30b55793150f9ae7478f8aa2126fe5598a31f928907eadbf9d5a19aa9964c python-colorzero-release-1.1.tar.gz +# Locally computed +sha256 47778d78e05bb6c39c022814e3712a0327c6418c7251757e72167ab8ff12bb4d LICENSE.txtpackage/python-colorzero/python-colorzero.mk new file +0
-0
package/python-colorzero/python-colorzero.mk line 8
Quoted 8 lines
package/python-colorzero/python-colorzero.mk new file +8
-0@@ -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.1PYTHON_COLORZERO_SITE = $(call github,waveform80,colorzero,release-$(PYTHON_COLORZERO_VERSION))
i.e, the VERSION field contains really just the version.
package/python-colorzero/python-colorzero.mk line 9
Quoted 1 line
package/python-colorzero/python-colorzero.mk new file +1
-0+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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com