2020-04-04 00:17:18 +00:00
|
|
|
%global common_description %{expand:
|
|
|
|
The 0MQ lightweight messaging kernel is a library which extends the
|
|
|
|
standard socket interfaces with features traditionally provided by
|
|
|
|
specialized messaging middle-ware products. 0MQ sockets provide an
|
|
|
|
abstraction of asynchronous message queues, multiple messaging
|
|
|
|
patterns, message filtering (subscriptions), seamless access to
|
|
|
|
multiple transport protocols and more.}
|
2010-08-16 11:10:46 +00:00
|
|
|
|
2022-08-03 12:53:00 +00:00
|
|
|
Name: python-zmq
|
2023-10-22 22:53:44 +00:00
|
|
|
Version: 25.1.1
|
|
|
|
Release: %autorelease
|
2010-08-16 11:10:46 +00:00
|
|
|
Summary: Software library for fast, message-based applications
|
|
|
|
|
2023-10-22 22:53:44 +00:00
|
|
|
License: MPLv2.0 and ASL 2.0 and BSD
|
2020-04-04 00:17:18 +00:00
|
|
|
URL: https://zeromq.org/languages/python/
|
2022-08-03 12:53:00 +00:00
|
|
|
Source0: %{pypi_source pyzmq}
|
2020-04-04 00:17:18 +00:00
|
|
|
|
2024-03-11 09:27:23 +00:00
|
|
|
# Python 3.13 compatibility
|
|
|
|
Patch: https://github.com/zeromq/pyzmq/pull/1961.patch
|
|
|
|
|
2018-07-10 13:56:25 +00:00
|
|
|
BuildRequires: gcc
|
2014-08-27 21:19:09 +00:00
|
|
|
|
2023-10-22 23:21:23 +00:00
|
|
|
BuildRequires: pkgconfig(libzmq)
|
2010-08-16 11:10:46 +00:00
|
|
|
|
2015-09-01 16:19:32 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
2016-07-12 17:28:13 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
2023-06-24 18:19:02 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest-asyncio
|
2016-07-12 17:28:13 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-tornado
|
2022-08-03 12:45:53 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-numpy
|
2010-08-16 11:10:46 +00:00
|
|
|
|
2024-03-11 08:31:36 +00:00
|
|
|
# The gevent tests are automatically skipped when gevent is not installed.
|
|
|
|
# When bootstrapping new Python versions, gevent is often not available until very late.
|
|
|
|
# This bcond allows to ship zmq without gevent when needed.
|
|
|
|
%bcond gevent 1
|
|
|
|
%if %{with gevent}
|
|
|
|
BuildRequires: python%{python3_pkgversion}-gevent
|
|
|
|
%endif
|
|
|
|
|
2020-04-04 00:17:18 +00:00
|
|
|
%description %{common_description}
|
2010-08-16 11:10:46 +00:00
|
|
|
|
2011-07-31 13:47:31 +00:00
|
|
|
|
2022-08-03 12:53:00 +00:00
|
|
|
%package -n python%{python3_pkgversion}-zmq
|
2019-11-29 10:46:14 +00:00
|
|
|
Summary: %{summary}
|
2024-04-13 08:24:52 +00:00
|
|
|
License: MPL-2.0
|
2022-08-03 12:53:00 +00:00
|
|
|
%py_provides python%{python3_pkgversion}-pyzmq
|
2020-04-04 00:17:18 +00:00
|
|
|
|
2022-08-03 12:53:00 +00:00
|
|
|
%description -n python%{python3_pkgversion}-zmq %{common_description}
|
2010-08-16 11:10:46 +00:00
|
|
|
|
|
|
|
This package contains the python bindings.
|
2011-07-31 13:47:31 +00:00
|
|
|
|
|
|
|
|
2022-08-03 12:53:00 +00:00
|
|
|
%package -n python%{python3_pkgversion}-zmq-tests
|
2019-11-29 10:46:14 +00:00
|
|
|
Summary: %{summary}, testsuite
|
2024-04-13 08:24:52 +00:00
|
|
|
License: MPL-2.0
|
2015-09-01 16:19:32 +00:00
|
|
|
Requires: python%{python3_pkgversion}-zmq = %{version}-%{release}
|
2022-08-03 12:53:00 +00:00
|
|
|
%py_provides python%{python3_pkgversion}-pyzmq-tests
|
2020-04-04 00:17:18 +00:00
|
|
|
|
2022-08-03 12:53:00 +00:00
|
|
|
%description -n python%{python3_pkgversion}-zmq-tests %{common_description}
|
2011-07-31 13:47:31 +00:00
|
|
|
|
|
|
|
This package contains the testsuite for the python bindings.
|
|
|
|
|
2010-08-16 11:10:46 +00:00
|
|
|
|
|
|
|
%prep
|
2024-03-11 09:27:23 +00:00
|
|
|
%autosetup -p1 -n pyzmq-%{version}
|
2012-08-03 22:08:54 +00:00
|
|
|
|
2023-06-24 18:19:02 +00:00
|
|
|
# Upstream is testing with cython 3 on 3.12
|
|
|
|
sed -i -e '/cython>=3/d' pyproject.toml test-requirements.txt
|
|
|
|
sed -i -e '/min_cython_version/s/"3.*"/"0.29"/' setup.py
|
|
|
|
|
2014-08-27 21:19:09 +00:00
|
|
|
# remove bundled libraries
|
|
|
|
rm -rf bundled
|
|
|
|
|
2022-08-02 18:28:32 +00:00
|
|
|
# remove the Cython .c files in order to regenerate them:
|
2019-05-14 18:10:49 +00:00
|
|
|
find zmq -name "*.c" -delete
|
2012-08-03 22:08:54 +00:00
|
|
|
|
2010-08-16 11:10:46 +00:00
|
|
|
# remove shebangs
|
2022-08-02 18:28:32 +00:00
|
|
|
grep -lr "^#\!/usr/bin/env python" | xargs sed -i "1d"
|
2010-08-16 11:10:46 +00:00
|
|
|
|
|
|
|
# remove excecutable bits
|
2022-08-02 18:28:32 +00:00
|
|
|
find . -type f -executable | xargs chmod -x
|
2011-01-18 22:11:13 +00:00
|
|
|
|
2022-08-02 18:28:32 +00:00
|
|
|
%generate_buildrequires
|
|
|
|
%pyproject_buildrequires
|
2010-09-23 12:08:23 +00:00
|
|
|
|
2010-08-16 11:10:46 +00:00
|
|
|
%build
|
2022-08-02 18:28:32 +00:00
|
|
|
%pyproject_wheel
|
2010-08-16 11:10:46 +00:00
|
|
|
|
|
|
|
%install
|
2022-08-02 18:28:32 +00:00
|
|
|
%pyproject_install
|
|
|
|
%pyproject_save_files zmq
|
2010-08-16 11:10:46 +00:00
|
|
|
|
|
|
|
%check
|
2022-08-03 12:45:53 +00:00
|
|
|
# to avoid partially initialized zmq module from cwd
|
2024-02-18 04:24:07 +00:00
|
|
|
# test_draft seems to get incorrectly run - https://github.com/zeromq/pyzmq/issues/1853
|
2022-08-03 12:45:53 +00:00
|
|
|
cd %{_topdir}
|
2023-06-28 17:36:11 +00:00
|
|
|
%pytest --pyargs zmq -v --asyncio-mode auto \
|
|
|
|
%ifarch ppc64le
|
2024-02-18 04:24:07 +00:00
|
|
|
-k "not (test_draft or test_green_device or (Green and (test_raw or test_timeout or test_poll)))" # this crashes on Python 3.12, TODO investigate
|
|
|
|
%else
|
|
|
|
-k "not test_draft"
|
2023-06-28 17:36:11 +00:00
|
|
|
%endif
|
2010-08-16 11:10:46 +00:00
|
|
|
|
|
|
|
|
2022-08-03 12:53:00 +00:00
|
|
|
%files -n python%{python3_pkgversion}-zmq -f %{pyproject_files}
|
2016-07-12 17:28:13 +00:00
|
|
|
%doc README.md
|
2022-08-03 12:53:00 +00:00
|
|
|
%exclude %{python3_sitearch}/zmq/tests
|
2011-07-31 13:47:31 +00:00
|
|
|
|
2022-08-03 12:53:00 +00:00
|
|
|
%files -n python%{python3_pkgversion}-zmq-tests
|
|
|
|
%{python3_sitearch}/zmq/tests
|
2010-08-16 11:10:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-10-22 22:53:44 +00:00
|
|
|
%autochangelog
|
2023-07-21 15:33:56 +00:00
|
|
|
|