forked from pool/python-pyzmq
Accepting request 872200 from home:bnavigator:branches:devel:languages:python
- Update to 22.0.3 - Don't test numpy on python36 flavor, because python36-numpy is no longer available in Tumbleweed (NEP 29) - Make sure we use the Cython backend, not CFFI, wich is for PyPy. * fixes gh#zeromq/pyzmq#1431 and gh#zeromq/pyzmq#1432 - Remove skip_test_tracker.patch - Got an oom error on the build service: Require at least 8GB of RAM through _constraints file OBS-URL: https://build.opensuse.org/request/show/872200 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyzmq?expand=0&rev=93
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pyzmq
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -26,41 +26,43 @@
|
||||
%bcond_with tests
|
||||
%endif
|
||||
Name: python-pyzmq
|
||||
Version: 20.0.0
|
||||
Version: 22.0.3
|
||||
Release: 0
|
||||
Summary: Python bindings for 0MQ
|
||||
License: LGPL-3.0-or-later AND BSD-3-Clause
|
||||
URL: https://github.com/zeromq/pyzmq
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pyzmq/pyzmq-%{version}.tar.gz
|
||||
Source1: python-pyzmq-rpmlintrc
|
||||
# PATCH-FIX-OPENSUSE skip_test_tracker.patch
|
||||
Patch1: skip_test_tracker.patch
|
||||
BuildRequires: %{python_module Cython}
|
||||
BuildRequires: %{python_module cffi}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module gevent}
|
||||
# Test requirements
|
||||
BuildRequires: %{python_module numpy}
|
||||
BuildRequires: %{python_module paramiko}
|
||||
BuildRequires: %{python_module pexpect}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module devel >= 3.6}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module simplejson}
|
||||
BuildRequires: %{python_module tornado}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: zeromq-devel
|
||||
Requires: python
|
||||
# SECTION Test requirements
|
||||
BuildRequires: %{python_module gevent}
|
||||
BuildRequires: %{python_module paramiko}
|
||||
BuildRequires: %{python_module pytest-timeout}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module simplejson}
|
||||
BuildRequires: %{python_module tornado}
|
||||
BuildRequires: %{python_module numpy if (%python-base without python36-base)}
|
||||
# /SECTION
|
||||
# SECTION pypy3 is not in openSUSE at the moment, it would use the cffi backend
|
||||
BuildRequires: %{python_module cffi if (%python with pypy3)}
|
||||
BuildRequires: %{python_module py if (%python with pypy3)}
|
||||
%if "%{python_flavor}" == "pypy3"
|
||||
Requires: python-cffi
|
||||
Requires: python-py
|
||||
%endif
|
||||
# /SECTION
|
||||
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
|
||||
Recommends: python-cffi
|
||||
Recommends: python-gevent
|
||||
Recommends: python-numpy
|
||||
Recommends: python-paramiko
|
||||
Recommends: python-pexpect
|
||||
Recommends: python-py
|
||||
Suggests: python-paramiko
|
||||
Recommends: python-simplejson
|
||||
Recommends: python-tornado
|
||||
Recommends: zeromq
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
@@ -84,8 +86,15 @@ Development libraries and headers needed to build software using %{name}.
|
||||
find examples zmq -name "*.py" -exec sed -i "s|#\!\/usr\/bin\/env python||" {} \;
|
||||
|
||||
%build
|
||||
# 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
|
||||
export CFLAGS="%{optflags}"
|
||||
%python_build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
@@ -94,13 +103,16 @@ export CFLAGS="%{optflags}"
|
||||
%if %{with tests}
|
||||
%check
|
||||
export LANG=en_US.UTF-8
|
||||
# skipped tests because of gh#zeromq/pyzmq#1431
|
||||
SKIPPED_TESTS="test_buffer_numpy or test_bytes or test_curve or test_frame_more or "
|
||||
SKIPPED_TESTS+="test_large_send or test_lifecycle1 or test_lifecycle2 or "
|
||||
SKIPPED_TESTS+="test_memoryview_shape or test_multi_tracker or test_plain or test_tracker"
|
||||
# gh#zeromq/pyzmq#1432
|
||||
SKIPPED_TESTS+=" or TestSocketGreen"
|
||||
%pytest_arch -k "not (${SKIPPED_TESTS})"
|
||||
# This test wants to build a custom cython extension, but does not have the source files installed into the buildroot
|
||||
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
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
@@ -109,12 +121,10 @@ SKIPPED_TESTS+=" or TestSocketGreen"
|
||||
%{python_sitearch}/zmq/
|
||||
%{python_sitearch}/pyzmq-%{version}-py*.egg-info
|
||||
%exclude %{python_sitearch}/zmq/utils/*.h
|
||||
%exclude %{python_sitearch}/zmq/backend/cffi/_verify.c
|
||||
%exclude %{python_sitearch}/zmq/backend/cffi/_cdefs.h
|
||||
|
||||
%files %{python_files devel}
|
||||
%{python_sitearch}/zmq/utils/*.h
|
||||
%{python_sitearch}/zmq/backend/cffi/_verify.c
|
||||
%{python_sitearch}/zmq/backend/cffi/_cdefs.h
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user