Skip to contentSkip to conversation

package/python-aenum: new package

PATCH New yegorslists at googlemail.com 2 participants 7 messages Jan 15, 2020 – Jan 31, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 package/python-aenum: new package

From: Yegor Yefremov <[email protected]>

---
Changes v1 -> v2:
- add followup patches fixing python-can package

 package/Config.in                      |  1 +
 package/python-aenum/Config.in         |  7 +++++++
 package/python-aenum/python-aenum.hash |  2 ++
 package/python-aenum/python-aenum.mk   | 14 ++++++++++++++
 4 files changed, 24 insertions(+)
 create mode 100644 package/python-aenum/Config.in
 create mode 100644 package/python-aenum/python-aenum.hash
 create mode 100644 package/python-aenum/python-aenum.mk
package/Config.in +1 -0
index 4c94914680..4c6e46b794 100644
@@ -832,6 +832,7 @@ endif
 	source "package/python3/Config.in"
 if BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
 menu "External python modules"
+	source "package/python-aenum/Config.in"
 	source "package/python-aioblescan/Config.in"
 	source "package/python-aiocoap/Config.in"
 	source "package/python-aioconsole/Config.in"
package/python-aenum/Config.in new file +7 -0
new file mode 100644
index 0000000000..be3dd0fb9c
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_PYTHON_AENUM
+	bool "python-aenum"
+	help
+	  Advanced Enumerations (compatible with Python's stdlib Enum),
+	  NamedTuples, and NamedConstants.
+
+	  https://pypi.org/project/aenum
package/python-aenum/python-aenum.hash new file +2 -0
new file mode 100644
index 0000000000..14436343ba
@@ -0,0 +1,2 @@
+# sha256 from https://pypi.org/pypi/aenum/json
+sha256	a4334cabf47c167d44ab5a6198837b80deec5d5bad1b5cf70c966c3a330260e8  aenum-2.2.3.tar.gz
package/python-aenum/python-aenum.mk new file +14 -0
new file mode 100644
index 0000000000..1d5322ef41
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-aenum
+#
+################################################################################
+
+PYTHON_AENUM_VERSION = 2.2.3
+PYTHON_AENUM_SOURCE = aenum-$(PYTHON_AENUM_VERSION).tar.gz
+PYTHON_AENUM_SITE = https://files.pythonhosted.org/packages/6f/6a/8ed729e0add885d7a559ebb06133029b1f8c4bd66cbf1bdee1ec969fb310
+PYTHON_AENUM_SETUP_TYPE = setuptools
+PYTHON_AENUM_LICENSE = BSD-3-Clause
+PYTHON_AENUM_LICENSE_FILES = aenum/LICENSE
+
+$(eval $(python-package))
Signature · 1 line
2.17.0
#1 lore raw

PATCH v2 1/3 package/python-aenum: new package

Hi Peter, all,

Quoted 71 lines · On Wed, Jan 15, 2020 at 9:09 AM <[email protected]> wrote:

From: Yegor Yefremov <[email protected]>

---
Changes v1 -> v2:
- add followup patches fixing python-can package

 package/Config.in                      |  1 +
 package/python-aenum/Config.in         |  7 +++++++
 package/python-aenum/python-aenum.hash |  2 ++
 package/python-aenum/python-aenum.mk   | 14 ++++++++++++++
 4 files changed, 24 insertions(+)
 create mode 100644 package/python-aenum/Config.in
 create mode 100644 package/python-aenum/python-aenum.hash
 create mode 100644 package/python-aenum/python-aenum.mk
package/Config.in +1 -0
index 4c94914680..4c6e46b794 100644
@@ -832,6 +832,7 @@ endif
        source "package/python3/Config.in"
 if BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
 menu "External python modules"
+       source "package/python-aenum/Config.in"
        source "package/python-aioblescan/Config.in"
        source "package/python-aiocoap/Config.in"
        source "package/python-aioconsole/Config.in"
package/python-aenum/Config.in new file +7 -0
new file mode 100644
index 0000000000..be3dd0fb9c
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_PYTHON_AENUM
+       bool "python-aenum"
+       help
+         Advanced Enumerations (compatible with Python's stdlib Enum),
+         NamedTuples, and NamedConstants.
+
+         https://pypi.org/project/aenum
package/python-aenum/python-aenum.hash new file +2 -0
new file mode 100644
index 0000000000..14436343ba
@@ -0,0 +1,2 @@
+# sha256 from https://pypi.org/pypi/aenum/json
+sha256 a4334cabf47c167d44ab5a6198837b80deec5d5bad1b5cf70c966c3a330260e8  aenum-2.2.3.tar.gz
package/python-aenum/python-aenum.mk new file +14 -1
new file mode 100644
index 0000000000..1d5322ef41
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-aenum
+#
+################################################################################
+
+PYTHON_AENUM_VERSION = 2.2.3
+PYTHON_AENUM_SOURCE = aenum-$(PYTHON_AENUM_VERSION).tar.gz
+PYTHON_AENUM_SITE = https://files.pythonhosted.org/packages/6f/6a/8ed729e0add885d7a559ebb06133029b1f8c4bd66cbf1bdee1ec969fb310
+PYTHON_AENUM_SETUP_TYPE = setuptools
+PYTHON_AENUM_LICENSE = BSD-3-Clause
+PYTHON_AENUM_LICENSE_FILES = aenum/LICENSE
+
+$(eval $(python-package))
--
Quoted 1 line

2.17.0

This patch series can be also interesting for 2019.11.x branch as this dependency exists since python-can 3.2.0.

Yegor

#2 lore raw

PATCH v2 2/3 package/python-can: add missing dependency

In reply to yegorslists at googlemail.com

From: Yegor Yefremov <[email protected]>

Recent python-can versions depend on aenum package.

---
Changes v1 -> v2:
- no changes

 package/python-can/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/python-can/Config.in +1 -0
index f3ed1b77e3..73f667e73a 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_PYTHON_CAN
 	select BR2_PACKAGE_PYTHON3_SQLITE if BR2_PACKAGE_PYTHON3 # runtime
 	select BR2_PACKAGE_PYTHON_TYPING if BR2_PACKAGE_PYTHON # runtime
 	select BR2_PACKAGE_PYTHON_WRAPT # runtime
+	select BR2_PACKAGE_PYTHON_AENUM # runtime
 	select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON
 	select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3
 	help
Signature · 1 line
2.17.0
#3 lore raw

PATCH v2 2/3 package/python-can: add missing dependency

Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"yegorslists" == yegorslists <[email protected]> writes:

From: Yegor Yefremov <[email protected]> Recent python-can versions depend on aenum package.

---
Changes v1 -> v2:
- no changes

Committed after extending the commit message with details about when this dependency was exactly added, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH v2 3/3 support/testing: add python-can test case

In reply to yegorslists at googlemail.com

From: Yegor Yefremov <[email protected]>

---
Changes v1 -> v2:
- no changes

 .gitlab-ci.yml                                |  2 ++
 DEVELOPERS                                    |  1 +
 .../tests/package/sample_python_can.py        |  6 +++++
 .../testing/tests/package/test_python_can.py  | 23 +++++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_can.py
 create mode 100644 support/testing/tests/package/test_python_can.py
.gitlab-ci.yml +2 -0
index b953e1998c..d5a2a06b6e 100644
@@ -441,6 +441,8 @@ tests.package.test_python_automat.TestPythonPy3Automat: { extends: .runtime_test
 tests.package.test_python_avro.TestPythonAvro: { extends: .runtime_test }
 tests.package.test_python_bitstring.TestPythonPy2Bitstring: { extends: .runtime_test }
 tests.package.test_python_bitstring.TestPythonPy3Bitstring: { extends: .runtime_test }
+tests.package.test_python_can.TestPythonPy2Can: { extends: .runtime_test }
+tests.package.test_python_can.TestPythonPy3Can: { extends: .runtime_test }
 tests.package.test_python_cbor.TestPythonPy2Cbor: { extends: .runtime_test }
 tests.package.test_python_cbor.TestPythonPy3Cbor: { extends: .runtime_test }
 tests.package.test_python_click.TestPythonPy2Click: { extends: .runtime_test }
DEVELOPERS +1 -0
index 510fea78de..927b87fd91 100644
@@ -2616,6 +2616,7 @@ F:	package/ti-utils/
 F:	package/x11r7/xapp_xconsole/
 F:	package/x11r7/xapp_xinput-calibrator/
 F:	package/zlog/
+F:	support/testing/tests/package/test_python_can.py
 F:	utils/scanpypi
 
 N:	Zoltan Gyarmati <[email protected]>
support/testing/tests/package/sample_python_can.py new file +6 -0
new file mode 100644
index 0000000000..c5808be619
@@ -0,0 +1,6 @@
+import can
+
+msg = can.Message(arbitration_id=0xc0ffee,
+                  data=[0, 25, 0, 1, 3, 1, 4, 1],
+                  is_extended_id=True)
+assert(msg is not None)
support/testing/tests/package/test_python_can.py new file +23 -0
new file mode 100644
index 0000000000..d509d05dbb
@@ -0,0 +1,23 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy2Can(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON=y
+        BR2_PACKAGE_PYTHON_CAN=y
+        """
+    sample_scripts = ["tests/package/sample_python_can.py"]
+    timeout = 40
+
+
+class TestPythonPy3Can(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_CAN=y
+        """
+    sample_scripts = ["tests/package/sample_python_can.py"]
+    timeout = 40
Signature · 1 line
2.17.0
#6 lore raw

PATCH v2 1/3 package/python-aenum: new package

In reply to yegorslists at googlemail.com
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"yegorslists" == yegorslists <[email protected]> writes:

From: Yegor Yefremov <[email protected]>

---
Changes v1 -> v2:
- add followup patches fixing python-can package

Committed after adding a hash for the license file, thanks.

Signature · 1 line
Bye, Peter Korsgaard