meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb
Khem Raj f436ca52ba
python3-pyzmq: Add missing dep on python3-unixadmin for ptests
Fixes
ImportError while importing test module '/usr/lib/python3-pyzmq/ptest/tests/test_ssh.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_ssh.py:1: in <module>
    from zmq.ssh.tunnel import select_random_ports
../../python3.12/site-packages/zmq/ssh/__init__.py:1: in <module>
    from zmq.ssh.tunnel import *
../../python3.12/site-packages/zmq/ssh/tunnel.py:18: in <module>
    from getpass import getpass, getuser
E   ModuleNotFoundError: No module named 'getpass'
ERROR: tests/test_ssh.py:tests/test_ssh.py

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-02-29 12:46:50 -08:00

58 lines
1.7 KiB
BlitzBasic

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://LICENSE.BSD;md5=1787206f198344195a671b60326c59dc \
file://LICENSE.LESSER;md5=0e99bfbdd8b9d33b0221986fe3be89ed \
"
DEPENDS = "python3-packaging-native python3-cython-native python3-setuptools-scm-native zeromq"
SRC_URI:append = " \
file://club-rpath-out.patch \
file://run-ptest \
"
SRC_URI[sha256sum] = "93f1aa311e8bb912e34f004cf186407a4e90eec4f0ecc0efd26056bf7eda0226"
inherit pypi pkgconfig python_setuptools_build_meta ptest
PACKAGES =+ "\
${PN}-test \
"
FILES:${PN}-test += "\
${libdir}/${PYTHON_DIR}/site-packages/*/tests \
"
RDEPENDS:${PN} += "\
python3-json \
python3-multiprocessing \
"
RDEPENDS:${PN}-ptest += "\
${PN}-test \
python3-pytest \
python3-unittest-automake-output \
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/
}