Skip to contentSkip to conversation

python3-construct: new recipe version 2.10.70

PATCH Superseded Jan Vermaete 2 participants 2 messages Sep 14

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3-construct: new recipe version 2.10.70

Recipe taken from meta-homeassistant of Tom Geelen.

Added ptests. But removed the tests with binary data (e.g. .so file). Those tests gave to much issues with QA rules of Yocto/Openembedded.

Moved from pypi to github to have all test code.

---
 .../ptest-packagelists-meta-python.inc        |  1 +
 ...ile-to-enable-pytest-8.x.y-to-find-t.patch | 25 ++++++++++++
 ...002-pytest.ini-disable-the-benchmark.patch | 26 ++++++++++++
 .../python3-construct_2.10.70.bb              | 40 +++++++++++++++++++
 4 files changed, 92 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python3-construct/python3-construct/0001-add-pytest.ini-file-to-enable-pytest-8.x.y-to-find-t.patch
 create mode 100644 meta-python/recipes-devtools/python3-construct/python3-construct/0002-pytest.ini-disable-the-benchmark.patch
 create mode 100644 meta-python/recipes-devtools/python3-construct/python3-construct_2.10.70.bb
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index e4eae4ef43..9b3a535e55 100644
@@ -19,6 +19,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-cachetools \
     python3-cbor2 \
     python3-configobj \
+    python3-construct \
     python3-pyconnman \
     python3-click \
     python3-dasbus \
meta-python/recipes-devtools/python3-construct/python3-construct/0001-add-pytest.ini-file-to-enable-pytest-8.x.y-to-find-t.patch new file +25 -0
new file mode 100644
index 0000000000..3e9e73bd45
@@ -0,0 +1,25 @@
+From b8d0ba87f629cc6065a2d06cedc5e850407c45de Mon Sep 17 00:00:00 2001
+From: Franz Haas <[email protected]>
+Date: Tue, 17 Sep 2024 11:23:28 +0200
+Subject: [PATCH 1/1] - add pytest.ini file to enable pytest 8.x.y to find the
+ tests
+
+Upstream-Status: Backport [https://github.com/construct/construct/commit/b8d0ba87f629cc6065a2d06cedc5e850407c45de]
+
+---
+ pytest.ini | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 pytest.ini
+
+diff --git a/pytest.ini b/pytest.ini
+new file mode 100644
+index 0000000..f5a52af
+--- /dev/null
++++ b/pytest.ini
+@@ -0,0 +1,3 @@
++[pytest]
++pythonpath = .
++
+-- 
+2.47.3
+
meta-python/recipes-devtools/python3-construct/python3-construct/0002-pytest.ini-disable-the-benchmark.patch new file +26 -0
new file mode 100644
index 0000000000..bc89546c82
@@ -0,0 +1,26 @@
+From 7acb7aa51db762a723d85b81262ca14614dbeac0 Mon Sep 17 00:00:00 2001
+From: Jan Vermaete <[email protected]>
+Date: Mon, 14 Sep 2026 10:24:51 +0200
+Subject: [PATCH 2/2] pytest.ini: disable the benchmark
+
+Benchmark is also disabled in the github workflow of the project
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Jan Vermaete <[email protected]>
+---
+ pytest.ini | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pytest.ini b/pytest.ini
+index f5a52af..4b1b4b6 100644
+--- a/pytest.ini
++++ b/pytest.ini
+@@ -1,3 +1,3 @@
+ [pytest]
+ pythonpath = .
+-
++addopts = --benchmark-disable
+-- 
+2.43.0
+
meta-python/recipes-devtools/python3-construct/python3-construct_2.10.70.bb new file +40 -0
new file mode 100644
index 0000000000..681c43122a
@@ -0,0 +1,40 @@
+SUMMARY = "A powerful declarative symmetric parser/builder for binary data"
+HOMEPAGE = "http://construct.readthedocs.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=202b39559c1c79fe4715ce81e9e0ac02"
+RECIPE_MAINTAINER = "Tom Geelen <[email protected]>"
+
+SRC_URI = "\
+    git://github.com/construct/construct.git;protocol=https;branch=master \
+    file://0001-add-pytest.ini-file-to-enable-pytest-8.x.y-to-find-t.patch \
+    file://0002-pytest.ini-disable-the-benchmark.patch \
+"
+
+PV = "1.0+git"
+SRCREV = "c25a47172d4bde392b7ad188175b07b319d3dea4"
+
+inherit setuptools3 ptest-python-pytest
+
+PACKAGECONFIG ?= "extras"
+PACKAGECONFIG[extras] = ",,,python3-arrow python3-cloudpickle python3-cryptography python3-lz4 python3-numpy python3-ruamel-yaml"
+
+RDEPENDS:${PN} += "\
+    python3-compression \
+    python3-core \
+    python3-crypt \
+    python3-cryptography \
+    python3-debugger \
+    python3-misc \
+    python3-pickle \
+"
+
+RDEPENDS:${PN}-ptest += "python3-pytest-benchmark"
+
+do_install_ptest:append() {
+    # *.so files gives issues with QA of Yocto/OpenEmbedded
+    rm -rf ${D}${PTEST_PATH}/tests/deprecated_gallery
+    rm -rf ${D}${PTEST_PATH}/tests/gallery
+
+    install -d ${D}${PTEST_PATH}
+    install -m 0644 ${S}/pytest.ini ${D}${PTEST_PATH}
+}
Signature · 1 line
2.47.3
#1 lore raw
Quoted 100 lines · Jan Vermaete via lists.openembedded.org

Recipe taken from meta-homeassistant of Tom Geelen.

Added ptests. But removed the tests with binary data (e.g. .so file). Those tests gave to much issues with QA rules of Yocto/Openembedded.

Moved from pypi to github to have all test code.

---
 .../ptest-packagelists-meta-python.inc        |  1 +
 ...ile-to-enable-pytest-8.x.y-to-find-t.patch | 25 ++++++++++++
 ...002-pytest.ini-disable-the-benchmark.patch | 26 ++++++++++++
 .../python3-construct_2.10.70.bb              | 40 +++++++++++++++++++
 4 files changed, 92 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python3-construct/python3-construct/0001-add-pytest.ini-file-to-enable-pytest-8.x.y-to-find-t.patch
 create mode 100644 meta-python/recipes-devtools/python3-construct/python3-construct/0002-pytest.ini-disable-the-benchmark.patch
 create mode 100644 meta-python/recipes-devtools/python3-construct/python3-construct_2.10.70.bb
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index e4eae4ef43..9b3a535e55 100644
@@ -19,6 +19,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-cachetools \
     python3-cbor2 \
     python3-configobj \
+    python3-construct \
     python3-pyconnman \
     python3-click \
     python3-dasbus \
meta-python/recipes-devtools/python3-construct/python3-construct/0001-add-pytest.ini-file-to-enable-pytest-8.x.y-to-find-t.patch new file +25 -0
new file mode 100644
index 0000000000..3e9e73bd45
@@ -0,0 +1,25 @@
+From b8d0ba87f629cc6065a2d06cedc5e850407c45de Mon Sep 17 00:00:00 2001
+From: Franz Haas <[email protected]>
+Date: Tue, 17 Sep 2024 11:23:28 +0200
+Subject: [PATCH 1/1] - add pytest.ini file to enable pytest 8.x.y to find the
+ tests
+
+Upstream-Status: Backport [https://github.com/construct/construct/commit/b8d0ba87f629cc6065a2d06cedc5e850407c45de]
+
+---
+ pytest.ini | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 pytest.ini
+
+diff --git a/pytest.ini b/pytest.ini
+new file mode 100644
+index 0000000..f5a52af
+--- /dev/null
++++ b/pytest.ini
+@@ -0,0 +1,3 @@
++[pytest]
++pythonpath = .
++
+--
+2.47.3
+
meta-python/recipes-devtools/python3-construct/python3-construct/0002-pytest.ini-disable-the-benchmark.patch new file +26 -0
new file mode 100644
index 0000000000..bc89546c82
@@ -0,0 +1,26 @@
+From 7acb7aa51db762a723d85b81262ca14614dbeac0 Mon Sep 17 00:00:00 2001
+From: Jan Vermaete <[email protected]>
+Date: Mon, 14 Sep 2026 10:24:51 +0200
+Subject: [PATCH 2/2] pytest.ini: disable the benchmark
+
+Benchmark is also disabled in the github workflow of the project
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Jan Vermaete <[email protected]>
+---
+ pytest.ini | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pytest.ini b/pytest.ini
+index f5a52af..4b1b4b6 100644
+--- a/pytest.ini
++++ b/pytest.ini
+@@ -1,3 +1,3 @@
+ [pytest]
+ pythonpath = .
+-
++addopts = --benchmark-disable
+--
+2.43.0
+
meta-python/recipes-devtools/python3-construct/python3-construct_2.10.70.bb new file +0 -0
new file mode 100644
index 0000000000..681c43122a

meta-python/recipes-devtools/python3-construct/python3-construct_2.10.70.bb line 8

Quoted 8 lines
meta-python/recipes-devtools/python3-construct/python3-construct_2.10.70.bb new file +8 -0
@@ -0,0 +1,40 @@
+SUMMARY = "A powerful declarative symmetric parser/builder for binary data"
+HOMEPAGE = "http://construct.readthedocs.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=202b39559c1c79fe4715ce81e9e0ac02"
+RECIPE_MAINTAINER = "Tom Geelen <[email protected]>"
+
+SRC_URI = "\
+    git://github.com/construct/construct.git;protocol=https;branch=master \

please include tag=v${PV} in the SRC_URI

meta-python/recipes-devtools/python3-construct/python3-construct_2.10.70.bb line 13

Quoted 5 lines
meta-python/recipes-devtools/python3-construct/python3-construct_2.10.70.bb new file +5 -0
+    file://0001-add-pytest.ini-file-to-enable-pytest-8.x.y-to-find-t.patch \
+    file://0002-pytest.ini-disable-the-benchmark.patch \
+"
+
+PV = "1.0+git"

No need to set PV in the recipe, this can be dropped

Quoted 39 lines
meta-python/recipes-devtools/python3-construct/python3-construct_2.10.70.bb new file +27 -1
+SRCREV = "c25a47172d4bde392b7ad188175b07b319d3dea4"
+
+inherit setuptools3 ptest-python-pytest
+
+PACKAGECONFIG ?= "extras"
+PACKAGECONFIG[extras] = ",,,python3-arrow python3-cloudpickle python3-cryptography python3-lz4 python3-numpy python3-ruamel-yaml"
+
+RDEPENDS:${PN} += "\
+    python3-compression \
+    python3-core \
+    python3-crypt \
+    python3-cryptography \
+    python3-debugger \
+    python3-misc \
+    python3-pickle \
+"
+
+RDEPENDS:${PN}-ptest += "python3-pytest-benchmark"
+
+do_install_ptest:append() {
+    # *.so files gives issues with QA of Yocto/OpenEmbedded
+    rm -rf ${D}${PTEST_PATH}/tests/deprecated_gallery
+    rm -rf ${D}${PTEST_PATH}/tests/gallery
+
+    install -d ${D}${PTEST_PATH}
+    install -m 0644 ${S}/pytest.ini ${D}${PTEST_PATH}
+}
--

2.47.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#130020): https://lists.openembedded.org/g/openembedded-devel/message/130020
Mute This Topic: https://lists.openembedded.org/mt/121239797/3619737
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-