Skip to contentSkip to conversation

python3-pyzmq: added ptest

PATCH New Jan Vermaete 1 participant 2 messages Jul 24, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 python3-pyzmq: added ptest

And update the summary and description from the github website.

Two tests are failing because cython is not installed.
But this is the same when running pytest under a native Linux system.

---
 .../packagegroups/packagegroup-meta-python.bb |  1 +
 .../python/python3-pyzmq/run-ptest            |  3 +++
 .../python/python3-pyzmq_23.2.0.bb            | 25 +++++++++++++++++--
 3 files changed, 27 insertions(+), 2 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-pyzmq/run-ptest
meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +1 -0
index 0721c6c0d..1d2a9952c 100644
@@ -515,6 +515,7 @@ RDEPENDS:packagegroup-meta-python3-ptest = "\
     python3-pyserial-ptest \
     python3-pytest-lazy-fixture-ptest \
     python3-pytoml-ptest \
+    python3-pyzmq-ptest \
     python3-requests-file-ptest \
     python3-requests-toolbelt-ptest \
     python3-scrypt-ptest \
meta-python/recipes-devtools/python/python3-pyzmq/run-ptest new file +3 -0
new file mode 100644
index 000000000..b63c4de0d
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'
meta-python/recipes-devtools/python/python3-pyzmq_23.2.0.bb +23 -2
index 37ec9ec84..3471265e4 100644
@@ -1,4 +1,5 @@
-SUMMARY = "Pyzmq provides Zero message queue access for the Python language"
+SUMMARY = "PyZMQ: Python bindings for ZMQ"
+DESCRIPTION = "This package contains Python bindings for ZeroMQ. ZMQ is a lightweight and fast messaging implementation."
 HOMEPAGE = "http://zeromq.org/bindings:python"
 LICENSE = "BSD-3-Clause & LGPL-3.0-only"
 LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=11c65680f637c3df7f58bbc8d133e96e \
@@ -8,7 +9,11 @@ DEPENDS = "zeromq python3-packaging-native"
 SRC_URI += "file://club-rpath-out.patch"
 SRC_URI[sha256sum] = "a51f12a8719aad9dcfb55d456022f16b90abc8dde7d3ca93ce3120b40e3fa169"
 
-inherit pypi pkgconfig python_setuptools_build_meta
+inherit pypi pkgconfig python_setuptools_build_meta ptest
+
+SRC_URI += " \
+	file://run-ptest \
+"
 
 DEPENDS += "python3-packaging-native"
 
@@ -25,3 +30,19 @@ do_compile:prepend() {
     echo libzmq_extension = False >> ${S}/setup.cfg
     echo no_libzmq_extension = True >> ${S}/setup.cfg
 }
+
+RDEPENDS:${PN}-ptest += " \
+	${PN}-test \
+"
+
+PACKAGES =+ "\
+    ${PN}-test \
+"
+
+FILES:${PN}-test = " \
+    ${libdir}/${PYTHON_DIR}/site-packages/*/tests \
+"
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/tests
+	cp -rf ${S}/zmq/tests/* ${D}${PTEST_PATH}/tests/
+}
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 python3-pyzmq: fixed oelint-adv warnings

---
 .../python/python3-pyzmq_23.2.0.bb            | 47 ++++++++++---------
 1 file changed, 24 insertions(+), 23 deletions(-)
meta-python/recipes-devtools/python/python3-pyzmq_23.2.0.bb +24 -23
index 3471265e4..003f35d91 100644
@@ -2,24 +2,36 @@ SUMMARY = "PyZMQ: Python bindings for ZMQ"
 DESCRIPTION = "This package contains Python bindings for ZeroMQ. ZMQ is a lightweight and fast messaging implementation."
 HOMEPAGE = "http://zeromq.org/bindings:python"
 LICENSE = "BSD-3-Clause & LGPL-3.0-only"
-LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=11c65680f637c3df7f58bbc8d133e96e \
-                    file://COPYING.LESSER;md5=12c592fa0bcfff3fb0977b066e9cb69e"
-DEPENDS = "zeromq python3-packaging-native"
+LIC_FILES_CHKSUM = "\
+    file://COPYING.BSD;md5=11c65680f637c3df7f58bbc8d133e96e \
+    file://COPYING.LESSER;md5=12c592fa0bcfff3fb0977b066e9cb69e \
+"
+
+DEPENDS = "python3-packaging-native zeromq"
 
-SRC_URI += "file://club-rpath-out.patch"
+SRC_URI:append = " \
+    file://club-rpath-out.patch \
+    file://run-ptest \
+"
 SRC_URI[sha256sum] = "a51f12a8719aad9dcfb55d456022f16b90abc8dde7d3ca93ce3120b40e3fa169"
 
 inherit pypi pkgconfig python_setuptools_build_meta ptest
 
-SRC_URI += " \
-	file://run-ptest \
+PACKAGES =+ "\
+    ${PN}-test \
 "
 
-DEPENDS += "python3-packaging-native"
+FILES:${PN}-test += "\
+    ${libdir}/${PYTHON_DIR}/site-packages/*/tests \
+"
+
+RDEPENDS:${PN} += "\
+        ${PYTHON_PN}-json \
+        ${PYTHON_PN}-multiprocessing \
+"
 
-RDEPENDS:${PN} += " \
-	${PYTHON_PN}-multiprocessing \
-	${PYTHON_PN}-json \
+RDEPENDS:${PN}-ptest += "\
+        ${PN}-test \
 "
 
 do_compile:prepend() {
@@ -31,18 +43,7 @@ do_compile:prepend() {
     echo no_libzmq_extension = True >> ${S}/setup.cfg
 }
 
-RDEPENDS:${PN}-ptest += " \
-	${PN}-test \
-"
-
-PACKAGES =+ "\
-    ${PN}-test \
-"
-
-FILES:${PN}-test = " \
-    ${libdir}/${PYTHON_DIR}/site-packages/*/tests \
-"
 do_install_ptest() {
-	install -d ${D}${PTEST_PATH}/tests
-	cp -rf ${S}/zmq/tests/* ${D}${PTEST_PATH}/tests/
+        install -d ${D}${PTEST_PATH}/tests
+        cp -rf ${S}/zmq/tests/* ${D}${PTEST_PATH}/tests/
 }
Signature · 1 line
2.25.1