2010-12-01 17:11:35 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-pyzmq
|
|
|
|
#
|
2022-01-08 13:46:01 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2010-12-01 17:11:35 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2011-12-12 10:06:29 +01:00
|
|
|
|
2019-03-11 06:17:53 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-12-12 17:46:02 +01:00
|
|
|
#
|
2010-12-01 17:11:35 +01:00
|
|
|
|
2013-03-27 13:11:27 +01:00
|
|
|
|
2022-06-29 09:22:58 +02:00
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
2020-11-25 20:58:48 +01:00
|
|
|
%define skip_python2 1
|
2022-06-29 09:22:58 +02:00
|
|
|
%define plainpython python
|
2020-08-15 11:16:40 +02:00
|
|
|
%ifarch x86_64
|
|
|
|
%bcond_without tests
|
|
|
|
%else
|
2022-06-29 09:22:58 +02:00
|
|
|
# Disable tests, they are very slow/halt on many arch
|
2020-08-15 11:16:40 +02:00
|
|
|
%bcond_with tests
|
|
|
|
%endif
|
2013-03-27 13:11:27 +01:00
|
|
|
Name: python-pyzmq
|
2022-09-26 08:50:05 +02:00
|
|
|
Version: 24.0.1
|
2010-12-12 17:46:02 +01:00
|
|
|
Release: 0
|
2011-12-06 10:36:05 +01:00
|
|
|
Summary: Python bindings for 0MQ
|
2021-03-12 10:13:54 +01:00
|
|
|
License: BSD-3-Clause AND LGPL-3.0-or-later
|
2019-08-26 01:06:40 +02:00
|
|
|
URL: https://github.com/zeromq/pyzmq
|
2017-04-19 23:45:05 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pyzmq/pyzmq-%{version}.tar.gz
|
2022-06-29 09:22:58 +02:00
|
|
|
# For test markers
|
|
|
|
Source1: https://raw.githubusercontent.com/zeromq/pyzmq/v%{version}/pytest.ini
|
2017-04-19 23:45:05 +02:00
|
|
|
BuildRequires: %{python_module Cython}
|
2021-02-14 21:39:30 +01:00
|
|
|
BuildRequires: %{python_module devel >= 3.6}
|
2022-06-29 09:22:58 +02:00
|
|
|
BuildRequires: %{python_module packaging}
|
2021-02-14 21:39:30 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: zeromq-devel
|
2022-08-17 14:36:38 +02:00
|
|
|
Recommends: python-gevent
|
|
|
|
Recommends: python-numpy
|
|
|
|
Recommends: python-pexpect
|
|
|
|
Recommends: python-simplejson
|
|
|
|
Recommends: python-tornado
|
|
|
|
Suggests: python-paramiko
|
2021-02-14 21:39:30 +01:00
|
|
|
# SECTION Test requirements
|
2022-06-29 09:22:58 +02:00
|
|
|
BuildRequires: %{python_module numpy}
|
2017-04-19 23:45:05 +02:00
|
|
|
BuildRequires: %{python_module paramiko}
|
2022-01-08 13:37:17 +01:00
|
|
|
BuildRequires: %{python_module pytest-rerunfailures}
|
2021-02-14 21:39:30 +01:00
|
|
|
BuildRequires: %{python_module pytest-timeout}
|
2020-08-15 11:16:40 +02:00
|
|
|
BuildRequires: %{python_module pytest}
|
2017-04-19 23:45:05 +02:00
|
|
|
BuildRequires: %{python_module simplejson}
|
|
|
|
BuildRequires: %{python_module tornado}
|
2022-08-17 14:36:38 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
# SLE/Leap <= 15.4 has incompatible gevent API # https://www.gevent.org/api/gevent.timeout.html#gevent.Timeout.close
|
|
|
|
BuildRequires: %{python_module gevent >= 1.3a1}
|
|
|
|
%endif
|
2021-02-14 21:39:30 +01:00
|
|
|
# /SECTION
|
|
|
|
# SECTION pypy3 is not in openSUSE at the moment, it would use the cffi backend
|
2021-03-12 10:29:19 +01:00
|
|
|
BuildRequires: %{python_module cffi if (%python with pypy3)}
|
|
|
|
BuildRequires: %{python_module py if (%python with pypy3)}
|
2021-02-14 21:39:30 +01:00
|
|
|
%if "%{python_flavor}" == "pypy3"
|
|
|
|
Requires: python-cffi
|
|
|
|
Requires: python-py
|
|
|
|
%endif
|
|
|
|
# /SECTION
|
2017-04-19 23:45:05 +02:00
|
|
|
%python_subpackages
|
2010-12-01 17:11:35 +01:00
|
|
|
|
|
|
|
%description
|
2010-12-12 17:46:02 +01:00
|
|
|
PyZMQ is a lightweight and super-fast messaging library built on top of
|
|
|
|
the ZeroMQ library (http://www.zeromq.org).
|
2010-12-01 17:11:35 +01:00
|
|
|
|
2012-05-18 12:31:47 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: python-devel
|
|
|
|
Requires: zeromq-devel
|
2022-06-29 09:22:58 +02:00
|
|
|
Requires: %plainpython(abi) = %{python_version}
|
2012-05-18 12:31:47 +02:00
|
|
|
|
|
|
|
%description devel
|
2013-03-27 13:11:27 +01:00
|
|
|
Development libraries and headers needed to build software using %{name}.
|
2012-05-18 12:31:47 +02:00
|
|
|
|
2010-12-01 17:11:35 +01:00
|
|
|
%prep
|
2020-11-25 20:58:48 +01:00
|
|
|
%autosetup -n pyzmq-%{version} -p1
|
2022-06-29 09:22:58 +02:00
|
|
|
cp %{SOURCE1} ./
|
2020-11-25 20:58:48 +01:00
|
|
|
|
2013-03-27 13:11:27 +01:00
|
|
|
# Fix non-executable script rpmlint warning:
|
|
|
|
find examples zmq -name "*.py" -exec sed -i "s|#\!\/usr\/bin\/env python||" {} \;
|
2022-06-29 09:22:58 +02:00
|
|
|
chmod -x examples/pubsub/topics_pub.py examples/pubsub/topics_sub.py
|
2010-12-01 17:11:35 +01:00
|
|
|
|
2021-02-14 21:39:30 +01:00
|
|
|
# See https://github.com/zeromq/pyzmq/blob/master/setup.cfg.template
|
|
|
|
echo '
|
|
|
|
[global]
|
|
|
|
skip_check_zmq = False
|
|
|
|
zmq_prefix = %{_prefix}
|
|
|
|
no_libzmq_extension = True
|
|
|
|
'>> setup.cfg
|
2022-06-29 09:22:58 +02:00
|
|
|
|
|
|
|
%build
|
2017-04-19 23:45:05 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
2021-03-12 10:13:54 +01:00
|
|
|
%python_build
|
2010-12-01 17:11:35 +01:00
|
|
|
|
|
|
|
%install
|
2017-04-19 23:45:05 +02:00
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2013-03-27 13:11:27 +01:00
|
|
|
|
2017-04-19 23:45:05 +02:00
|
|
|
%if %{with tests}
|
|
|
|
%check
|
2020-09-25 12:25:59 +02:00
|
|
|
export LANG=en_US.UTF-8
|
2021-03-12 10:13:54 +01:00
|
|
|
# This test wants to build a custom cython extension, but does
|
|
|
|
# not have the source files installed into the buildroot
|
2021-02-14 21:39:30 +01:00
|
|
|
SKIPPED_TESTS+=" or test_cython"
|
2022-01-08 13:37:17 +01:00
|
|
|
# unreliable socket handling in obs environment
|
|
|
|
SKIPPED_TESTS+=" or test_log"
|
2021-02-14 21:39:30 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
|
|
|
# tries to open a network connection on older distributions
|
2022-06-29 09:22:58 +02:00
|
|
|
SKIPPED_TESTS+=" or test_null or test_int_sockopts"
|
2021-02-14 21:39:30 +01:00
|
|
|
%endif
|
|
|
|
mkdir cleantest
|
|
|
|
pushd cleantest
|
2022-01-08 13:37:17 +01:00
|
|
|
%pytest_arch --pyargs zmq -k "not (${SKIPPED_TESTS:4})" --timeout 1200
|
2021-02-14 21:39:30 +01:00
|
|
|
popd
|
2017-04-19 23:45:05 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files %{python_files}
|
2018-07-13 22:12:55 +02:00
|
|
|
%license COPYING.BSD COPYING.LESSER
|
|
|
|
%doc AUTHORS.md README.md examples
|
2013-03-27 13:11:27 +01:00
|
|
|
%{python_sitearch}/zmq/
|
2016-01-26 13:29:54 +01:00
|
|
|
%{python_sitearch}/pyzmq-%{version}-py*.egg-info
|
2013-03-27 13:11:27 +01:00
|
|
|
%exclude %{python_sitearch}/zmq/utils/*.h
|
2016-01-26 13:29:54 +01:00
|
|
|
%exclude %{python_sitearch}/zmq/backend/cffi/_cdefs.h
|
2012-05-18 12:31:47 +02:00
|
|
|
|
2017-04-19 23:45:05 +02:00
|
|
|
%files %{python_files devel}
|
2013-03-27 13:11:27 +01:00
|
|
|
%{python_sitearch}/zmq/utils/*.h
|
2016-01-26 13:29:54 +01:00
|
|
|
%{python_sitearch}/zmq/backend/cffi/_cdefs.h
|
2010-12-01 17:11:35 +01:00
|
|
|
|
|
|
|
%changelog
|