2010-12-01 16:11:35 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pyzmq
|
|
|
|
#
|
2021-02-14 20:39:30 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2010-12-01 16:11:35 +00: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 09:06:29 +00:00
|
|
|
|
2019-03-11 05:17:53 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-12-12 16:46:02 +00:00
|
|
|
#
|
2010-12-01 16:11:35 +00:00
|
|
|
|
2013-03-27 12:11:27 +00:00
|
|
|
|
2020-11-25 19:58:48 +00:00
|
|
|
%define skip_python2 1
|
2018-07-13 20:12:55 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-08-15 09:16:40 +00:00
|
|
|
# Disable tests, they are very slow/halt on many arch
|
|
|
|
%ifarch x86_64
|
|
|
|
%bcond_without tests
|
|
|
|
%else
|
|
|
|
%bcond_with tests
|
|
|
|
%endif
|
2013-03-27 12:11:27 +00:00
|
|
|
Name: python-pyzmq
|
2021-02-14 20:39:30 +00:00
|
|
|
Version: 22.0.3
|
2010-12-12 16:46:02 +00:00
|
|
|
Release: 0
|
2011-12-06 09:36:05 +00:00
|
|
|
Summary: Python bindings for 0MQ
|
2021-03-12 09:13:54 +00:00
|
|
|
License: BSD-3-Clause AND LGPL-3.0-or-later
|
2019-08-25 23:06:40 +00:00
|
|
|
URL: https://github.com/zeromq/pyzmq
|
2017-04-19 21:45:05 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pyzmq/pyzmq-%{version}.tar.gz
|
2014-08-02 11:01:26 +00:00
|
|
|
Source1: python-pyzmq-rpmlintrc
|
2017-04-19 21:45:05 +00:00
|
|
|
BuildRequires: %{python_module Cython}
|
2021-02-14 20:39:30 +00:00
|
|
|
BuildRequires: %{python_module devel >= 3.6}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: zeromq-devel
|
|
|
|
# SECTION Test requirements
|
2017-04-19 21:45:05 +00:00
|
|
|
BuildRequires: %{python_module gevent}
|
|
|
|
BuildRequires: %{python_module paramiko}
|
2021-02-14 20:39:30 +00:00
|
|
|
BuildRequires: %{python_module pytest-timeout}
|
2020-08-15 09:16:40 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2017-04-19 21:45:05 +00:00
|
|
|
BuildRequires: %{python_module simplejson}
|
|
|
|
BuildRequires: %{python_module tornado}
|
2021-03-12 09:13:54 +00:00
|
|
|
BuildRequires: %{python_module numpy if (%{python}-base without python36-base)}
|
2021-02-14 20:39:30 +00:00
|
|
|
# /SECTION
|
|
|
|
# SECTION pypy3 is not in openSUSE at the moment, it would use the cffi backend
|
2021-03-12 09:13:54 +00:00
|
|
|
BuildRequires: %{python_module cffi if (%{python} with pypy3)}
|
|
|
|
BuildRequires: %{python_module py if (%{python} with pypy3)}
|
2021-02-14 20:39:30 +00:00
|
|
|
%if "%{python_flavor}" == "pypy3"
|
|
|
|
Requires: python-cffi
|
|
|
|
Requires: python-py
|
|
|
|
%endif
|
|
|
|
# /SECTION
|
2018-03-07 14:43:00 +00:00
|
|
|
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
|
2015-07-29 09:20:44 +00:00
|
|
|
Recommends: python-gevent
|
|
|
|
Recommends: python-numpy
|
|
|
|
Recommends: python-pexpect
|
|
|
|
Recommends: python-simplejson
|
|
|
|
Recommends: python-tornado
|
2021-03-12 09:13:54 +00:00
|
|
|
Suggests: python-paramiko
|
2018-02-27 21:32:19 +00:00
|
|
|
%endif
|
2017-04-19 21:45:05 +00:00
|
|
|
%python_subpackages
|
2010-12-01 16:11:35 +00:00
|
|
|
|
|
|
|
%description
|
2010-12-12 16:46:02 +00:00
|
|
|
PyZMQ is a lightweight and super-fast messaging library built on top of
|
|
|
|
the ZeroMQ library (http://www.zeromq.org).
|
2010-12-01 16:11:35 +00:00
|
|
|
|
2012-05-18 10:31:47 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Requires: %{name} = %{version}
|
2021-03-12 09:13:54 +00:00
|
|
|
Requires: python-base
|
2012-05-18 10:31:47 +00:00
|
|
|
Requires: python-devel
|
|
|
|
Requires: zeromq-devel
|
|
|
|
|
|
|
|
%description devel
|
2013-03-27 12:11:27 +00:00
|
|
|
Development libraries and headers needed to build software using %{name}.
|
2012-05-18 10:31:47 +00:00
|
|
|
|
2010-12-01 16:11:35 +00:00
|
|
|
%prep
|
2020-11-25 19:58:48 +00:00
|
|
|
%autosetup -n pyzmq-%{version} -p1
|
|
|
|
|
2013-03-27 12:11:27 +00:00
|
|
|
# Fix non-executable script rpmlint warning:
|
|
|
|
find examples zmq -name "*.py" -exec sed -i "s|#\!\/usr\/bin\/env python||" {} \;
|
2010-12-01 16:11:35 +00:00
|
|
|
|
|
|
|
%build
|
2021-02-14 20:39:30 +00: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
|
2017-04-19 21:45:05 +00:00
|
|
|
export CFLAGS="%{optflags}"
|
2021-03-12 09:13:54 +00:00
|
|
|
%python_build
|
2010-12-01 16:11:35 +00:00
|
|
|
|
|
|
|
%install
|
2017-04-19 21:45:05 +00:00
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2013-03-27 12:11:27 +00:00
|
|
|
|
2017-04-19 21:45:05 +00:00
|
|
|
%if %{with tests}
|
|
|
|
%check
|
2020-09-25 10:25:59 +00:00
|
|
|
export LANG=en_US.UTF-8
|
2021-03-12 09:13:54 +00:00
|
|
|
# This test wants to build a custom cython extension, but does
|
|
|
|
# not have the source files installed into the buildroot
|
2021-02-14 20:39:30 +00:00
|
|
|
SKIPPED_TESTS+=" or test_cython"
|
|
|
|
%if 0%{?suse_version} < 1550
|
|
|
|
# tries to open a network connection on older distributions
|
|
|
|
SKIPPED_TESTS+=" or test_null"
|
|
|
|
%endif
|
|
|
|
mkdir cleantest
|
|
|
|
pushd cleantest
|
|
|
|
%pytest_arch --pyargs zmq -k "not (${SKIPPED_TESTS:4})" --timeout 120 -ra
|
|
|
|
popd
|
2017-04-19 21:45:05 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files %{python_files}
|
2018-07-13 20:12:55 +00:00
|
|
|
%license COPYING.BSD COPYING.LESSER
|
|
|
|
%doc AUTHORS.md README.md examples
|
2013-03-27 12:11:27 +00:00
|
|
|
%{python_sitearch}/zmq/
|
2016-01-26 12:29:54 +00:00
|
|
|
%{python_sitearch}/pyzmq-%{version}-py*.egg-info
|
2013-03-27 12:11:27 +00:00
|
|
|
%exclude %{python_sitearch}/zmq/utils/*.h
|
2016-01-26 12:29:54 +00:00
|
|
|
%exclude %{python_sitearch}/zmq/backend/cffi/_cdefs.h
|
2012-05-18 10:31:47 +00:00
|
|
|
|
2017-04-19 21:45:05 +00:00
|
|
|
%files %{python_files devel}
|
2013-03-27 12:11:27 +00:00
|
|
|
%{python_sitearch}/zmq/utils/*.h
|
2016-01-26 12:29:54 +00:00
|
|
|
%{python_sitearch}/zmq/backend/cffi/_cdefs.h
|
2010-12-01 16:11:35 +00:00
|
|
|
|
|
|
|
%changelog
|