diff mbox series

[meta-python,v2] python3-pyzmq: Upgrade 25.1.2 -> 26.3.0

Message ID 20250327032103.1366021-1-mingli.yu@eng.windriver.com
State Under Review
Headers show
Series [meta-python,v2] python3-pyzmq: Upgrade 25.1.2 -> 26.3.0 | expand

Commit Message

mingli.yu@eng.windriver.com March 27, 2025, 3:21 a.m. UTC
From: Mingli Yu <mingli.yu@windriver.com>

* LICENSE update:
  pyzmq no longer ships an LGPL core, it is BSD-only [1].

  The LICENSE.BSD is renamed to LICENSE.md [2].

* The new version switches to scikit-build-core backend and build
  with cmake.

[1] https://github.com/zeromq/pyzmq/commit/2f461c578b0cf188652e3ada843094cb5d24a02a
[2] https://github.com/zeromq/pyzmq/commit/1f4bc04f433b34f95dd703d6fe018042a65e2903

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 ...xt-Don-t-add-ZMQ_PREFIX-lib-to-RPATH.patch | 35 ++++++++++++++++++
 .../python/python3-pyzmq/club-rpath-out.patch | 29 ---------------
 ...yzmq_25.1.2.bb => python3-pyzmq_26.3.0.bb} | 37 ++++++++-----------
 3 files changed, 51 insertions(+), 50 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-pyzmq/0001-CMakeLists.txt-Don-t-add-ZMQ_PREFIX-lib-to-RPATH.patch
 delete mode 100644 meta-python/recipes-devtools/python/python3-pyzmq/club-rpath-out.patch
 rename meta-python/recipes-devtools/python/{python3-pyzmq_25.1.2.bb => python3-pyzmq_26.3.0.bb} (44%)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-pyzmq/0001-CMakeLists.txt-Don-t-add-ZMQ_PREFIX-lib-to-RPATH.patch b/meta-python/recipes-devtools/python/python3-pyzmq/0001-CMakeLists.txt-Don-t-add-ZMQ_PREFIX-lib-to-RPATH.patch
new file mode 100644
index 0000000000..6e862546e2
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pyzmq/0001-CMakeLists.txt-Don-t-add-ZMQ_PREFIX-lib-to-RPATH.patch
@@ -0,0 +1,35 @@ 
+From e91c99e57af9cc3a89383068282c2b494d873acc Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Wed, 26 Mar 2025 16:59:16 +0800
+Subject: [PATCH] CMakeLists.txt: Don't add $ZMQ_PREFIX/lib to $RPATH
+
+Fix the below error:
+ERROR: python3-pyzmq-26.3.0-r0 do_package_qa: QA Issue: python3-pyzmq: /usr/lib64/python3.13/site-packages/zmq/backend/cython/_zmq.cpython-313-x86_64-linux-gnu.so contains bad RPATH /build/tmp/work/corei7-64-wrs-linux/python3-pyzmq/26.3.0/recipe-sysroot/usr/lib64 [rpaths]
+ERROR: python3-pyzmq-26.3.0-r0 do_package_qa: QA Issue: python3-pyzmq: /usr/lib64/python3.13/site-packages/zmq/backend/cython/_zmq.cpython-313-x86_64-linux-gnu.so contains bad RPATH /build/tmp/work/corei7-64-wrs-linux/python3-pyzmq/26.3.0/recipe-sysroot/usr/lib64 [rpaths]
+ERROR: python3-pyzmq-26.3.0-r0 do_package_qa: QA Issue: python3-pyzmq: /usr/lib64/python3.13/site-packages/zmq/backend/cython/_zmq.cpython-313-x86_64-linux-gnu.so contains bad RPATH /build/tmp/work/corei7-64-wrs-linux/python3-pyzmq/26.3.0/recipe-sysroot/usr/lib64 [rpaths]
+ERROR: python3-pyzmq-26.3.0-r0 do_package_qa: QA Issue: python3-pyzmq: /usr/lib64/python3.13/site-packages/zmq/backend/cython/_zmq.cpython-313-x86_64-linux-gnu.so contains bad RPATH /build/tmp/work/corei7-64-wrs-linux/python3-pyzmq/26.3.0/recipe-sysroot/usr/lib64 [rpaths]
+ERROR: python3-pyzmq-26.3.0-r0 do_package_qa: Fatal QA errors were found, failing task.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6372c24..9fc47e4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,7 +18,7 @@ endif()
+ # legacy pyzmq env options, no PYZMQ_ prefix
+ set(ZMQ_PREFIX "auto" CACHE STRING "libzmq installation prefix or 'bundled'")
+ option(ZMQ_DRAFT_API "whether to build the libzmq draft API" OFF)
+-option(PYZMQ_LIBZMQ_RPATH "Add $ZMQ_PREFIX/lib to $RPATH (true by default). Set to false if libzmq will be bundled or relocated and RPATH is handled separately" ON)
++option(PYZMQ_LIBZMQ_RPATH "Add $ZMQ_PREFIX/lib to $RPATH (true by default). Set to false if libzmq will be bundled or relocated and RPATH is handled separately" OFF)
+ 
+ # anything new should start with PYZMQ_
+ option(PYZMQ_NO_BUNDLE "Prohibit building bundled libzmq. Useful for repackaging, to allow default search for libzmq and requiring it to succeed." OFF)
+-- 
+2.34.1
+
diff --git a/meta-python/recipes-devtools/python/python3-pyzmq/club-rpath-out.patch b/meta-python/recipes-devtools/python/python3-pyzmq/club-rpath-out.patch
deleted file mode 100644
index 61aeaca5fa..0000000000
--- a/meta-python/recipes-devtools/python/python3-pyzmq/club-rpath-out.patch
+++ /dev/null
@@ -1,29 +0,0 @@ 
-From efae4e08d13e0958d929ea524e21c0a210b31982 Mon Sep 17 00:00:00 2001
-From: Leon Anavi <leon.anavi@konsulko.com>
-Date: Fri, 22 Jan 2021 11:41:12 +0200
-Subject: [PATCH] setup.py: Adjust _add_rpath
-
-Fix error: unrecognized command-line option '-R'
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
-
----
- setup.py | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index b634d94..7f6a2f1 100755
---- a/setup.py
-+++ b/setup.py
-@@ -235,9 +235,6 @@ def _add_rpath(settings, path):
-     """
-     if sys.platform == 'darwin':
-         settings['extra_link_args'].extend(['-Wl,-rpath', '-Wl,%s' % path])
--    else:
--        settings['runtime_library_dirs'].append(path)
--
- 
- def settings_from_prefix(prefix=None):
-     """load appropriate library/include settings from ZMQ prefix"""
diff --git a/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb b/meta-python/recipes-devtools/python/python3-pyzmq_26.3.0.bb
similarity index 44%
rename from meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb
rename to meta-python/recipes-devtools/python/python3-pyzmq_26.3.0.bb
index 39b754dd5d..076e6de7a6 100644
--- a/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb
+++ b/meta-python/recipes-devtools/python/python3-pyzmq_26.3.0.bb
@@ -1,19 +1,26 @@ 
 SUMMARY = "PyZMQ: Python bindings for ZMQ"
 DESCRIPTION = "This package contains Python bindings for ZeroMQ. ZMQ is a lightweight and fast messaging implementation."
 HOMEPAGE = "https://zeromq.org/bindings:python"
-LICENSE = "BSD-3-Clause & LGPL-3.0-only"
+LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "\
-    file://LICENSE.BSD;md5=1787206f198344195a671b60326c59dc \
-    file://LICENSE.LESSER;md5=0e99bfbdd8b9d33b0221986fe3be89ed \
+    file://LICENSE.md;md5=1787206f198344195a671b60326c59dc \
 "
 
-DEPENDS = "python3-packaging-native python3-setuptools-scm-native zeromq"
+DEPENDS = "python3-packaging-native \
+           python3-setuptools-scm-native \
+           python3-scikit-build-core-native \
+           cmake-native \
+           ninja-native \
+           zeromq \
+"
+
+PEP517_BUILD_OPTS = "--skip-dependency-check"
 
 SRC_URI:append = " \
-    file://club-rpath-out.patch \
+    file://0001-CMakeLists.txt-Don-t-add-ZMQ_PREFIX-lib-to-RPATH.patch \
     file://run-ptest \
 "
-SRC_URI[sha256sum] = "93f1aa311e8bb912e34f004cf186407a4e90eec4f0ecc0efd26056bf7eda0226"
+SRC_URI[sha256sum] = "f1cd68b8236faab78138a8fc703f7ca0ad431b17a3fcac696358600d4e6243b3"
 
 inherit pypi pkgconfig python_setuptools_build_meta ptest cython
 
@@ -38,21 +45,9 @@  RDEPENDS:${PN}-ptest += "\
     python3-unixadmin \
 "
 
-do_compile:prepend() {
-    echo [global] > ${S}/setup.cfg
-    echo zmq_prefix = ${STAGING_DIR_HOST} >> ${S}/setup.cfg
-    echo have_sys_un_h = True >> ${S}/setup.cfg
-    echo skip_check_zmq = True >> ${S}/setup.cfg
-    echo libzmq_extension = False >> ${S}/setup.cfg
-    echo no_libzmq_extension = True >> ${S}/setup.cfg
-}
-
-do_install:append() {
-        sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}${PYTHON_SITEPACKAGES_DIR}/zmq/utils/config.json
-        sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}${PYTHON_SITEPACKAGES_DIR}/zmq/utils/compiler.json
-}
-
 do_install_ptest() {
         install -d ${D}${PTEST_PATH}/tests
-        cp -rf ${S}/zmq/tests/* ${D}${PTEST_PATH}/tests/
+        cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
 }
+
+INSANE_SKIP:${PN} = "already-stripped"