14
0
Files
python-eventlet/python-eventlet.spec

126 lines
4.8 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-eventlet
#
# Copyright (c) 2022 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-eventlet
Version: 0.33.1
Release: 0
Summary: Concurrent networking library for Python
License: MIT
Group: Development/Languages/Python
URL: http://eventlet.net
Source: https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#eventlet/eventlet#638 mcepl@suse.com
# Removes dependency on nose
Patch0: denose-eventlet.patch
# PATCH-FIX-UPSTREAM newdnspython.patch mcepl@suse.com -- patch is from gh#rthalley/dnspython#519, discussion in gh#eventlet/eventlet#638
Patch1: newdnspython.patch
# PATCH-FIX-UPSTREAM https://github.com/eventlet/eventlet/pull/643
Patch2: python-eventlet-FTBFS2028.patch
BuildRequires: %{python_module setuptools}
%if %{with python2}
BuildRequires: python2-monotonic >= 1.4
%endif
BuildRequires: fdupes
BuildRequires: netcfg
BuildRequires: python-rpm-macros
# SECTION TEST requirements
# eventlet parses /etc/protocols which is not available in normal build envs
BuildRequires: sysconfig-netconfig
BuildRequires: %{python_module dnspython >= 1.15.0}
BuildRequires: %{python_module greenlet >= 0.3}
%if 0%{?suse_version} >= 1550
BuildRequires: %{python_module pyOpenSSL}
%endif
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pyzmq}
BuildRequires: %{python_module six >= 1.10.0}
BuildRequires: %{python_module testsuite}
# /SECTION
Requires: netcfg
Requires: python-dnspython >= 1.15.0
Requires: python-greenlet >= 0.3
%ifpython2
- update to 0.24.1: * greendns: don't contact nameservers if one entry is returned from hosts file; Thanks to Daniel Alvarez * greendns: Fix infinite loop when UDP source address mismatch; Thanks to Lon Hohberger * greendns: Fix bad ipv6 comparison; Thanks to Lon Hohberger * wsgi: Use byte strings on py2 and unicode strings on py3; Thanks to Tim Burke * pools: put to empty pool would block sometimes; Thanks to Sam Merritt * greendns: resolving over TCP produced ValueError; Thanks to Jaume Marhuenda * support.greendns: ImportError when dns.rdtypes was imported before eventlet; Thanks to Jaume Marhuenda * greendns: full comment lines were not skipped; Thanks to nat-goodspeed * Drop support for Python3.3; Python2.6 and python-epoll package * external dependencies for six, monotonic, dnspython; Thanks to nat-goodspeed * wsgi: Don't strip all Unicode whitespace from headers on py3; Thanks to Tim Burke * green.threading: current_thread() did not see new monkey-patched threads; Thanks to Jake Tesler * tpool: exception in tpool-ed call leaked memory via backtrace * wsgi: latin-1 encoding dance for environ[PATH_INFO] * Fixed issue installing excess enum34 on Python3.4+ (rebuild with updated setuptools) * event: Event.wait() timeout=None argument to be compatible with upstream CPython * greendns: Treat /etc/hosts entries case-insensitive; Thanks to Ralf Haferkamp * convenience: (SO_REUSEPORT) socket.error is not OSError on Python 2; Thanks to JacoFourie@github * convenience: SO_REUSEPORT is not available on WSL platform (Linux on Windows) * convenience: skip SO_REUSEPORT for bind on random port (0) * dns: reading /etc/hosts raised DeprecationWarning for universal lines on Python 3.4+; Thanks to Chris Kerr * green.openssl: Drop OpenSSL.rand support; Thanks to Haikel Guemar * green.subprocess: keep CalledProcessError identity; Thanks to Linbing@github * greendns: be explicit about expecting bytes from sock.recv; Thanks to Matt Bennett * greendns: early socket.timeout was breaking IO retry loops * GreenSocket.accept does not notify_open; Thanks to orishoshan * patcher: set locked RLocks' owner only when patching existing locks; Thanks to Quan Tian * patcher: workaround for monotonic "no suitable implementation"; Thanks to Geoffrey Thomas * queue: empty except was catching too much OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-eventlet?expand=0&rev=53
2018-12-06 15:44:37 +00:00
Requires: python-monotonic >= 1.4
%endif
- update to 0.24.1: * greendns: don't contact nameservers if one entry is returned from hosts file; Thanks to Daniel Alvarez * greendns: Fix infinite loop when UDP source address mismatch; Thanks to Lon Hohberger * greendns: Fix bad ipv6 comparison; Thanks to Lon Hohberger * wsgi: Use byte strings on py2 and unicode strings on py3; Thanks to Tim Burke * pools: put to empty pool would block sometimes; Thanks to Sam Merritt * greendns: resolving over TCP produced ValueError; Thanks to Jaume Marhuenda * support.greendns: ImportError when dns.rdtypes was imported before eventlet; Thanks to Jaume Marhuenda * greendns: full comment lines were not skipped; Thanks to nat-goodspeed * Drop support for Python3.3; Python2.6 and python-epoll package * external dependencies for six, monotonic, dnspython; Thanks to nat-goodspeed * wsgi: Don't strip all Unicode whitespace from headers on py3; Thanks to Tim Burke * green.threading: current_thread() did not see new monkey-patched threads; Thanks to Jake Tesler * tpool: exception in tpool-ed call leaked memory via backtrace * wsgi: latin-1 encoding dance for environ[PATH_INFO] * Fixed issue installing excess enum34 on Python3.4+ (rebuild with updated setuptools) * event: Event.wait() timeout=None argument to be compatible with upstream CPython * greendns: Treat /etc/hosts entries case-insensitive; Thanks to Ralf Haferkamp * convenience: (SO_REUSEPORT) socket.error is not OSError on Python 2; Thanks to JacoFourie@github * convenience: SO_REUSEPORT is not available on WSL platform (Linux on Windows) * convenience: skip SO_REUSEPORT for bind on random port (0) * dns: reading /etc/hosts raised DeprecationWarning for universal lines on Python 3.4+; Thanks to Chris Kerr * green.openssl: Drop OpenSSL.rand support; Thanks to Haikel Guemar * green.subprocess: keep CalledProcessError identity; Thanks to Linbing@github * greendns: be explicit about expecting bytes from sock.recv; Thanks to Matt Bennett * greendns: early socket.timeout was breaking IO retry loops * GreenSocket.accept does not notify_open; Thanks to orishoshan * patcher: set locked RLocks' owner only when patching existing locks; Thanks to Quan Tian * patcher: workaround for monotonic "no suitable implementation"; Thanks to Geoffrey Thomas * queue: empty except was catching too much OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-eventlet?expand=0&rev=53
2018-12-06 15:44:37 +00:00
Requires: python-six >= 1.10.0
BuildArch: noarch
%python_subpackages
%description
Eventlet is a concurrent networking library for Python that allows
changing how code is run.
It uses epoll or libevent for scalable non-blocking I/O. Coroutines
ensure that the developer uses a blocking style of programming that is similar
to threading, but provide the benefits of non-blocking I/O. The event dispatch
is implicit, which means Eventlet can be used from the Python
interpreter, or as part of a larger application.
%prep
%setup -q -n eventlet-%{version}
%autopatch -p1
# Fix non-executable script
sed -i '1{/^#!/ d}' eventlet/support/greendns.py
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# python2 is required to build for Leap, but tests fail (even upstream)
python2_pytest_param='--collect-only'
# dnspython 1 and 2: backdoor tests fail with "take too long"
skiptests="(BackdoorTest and test_server)"
# fail only with dnspython 2:
skiptests+=" or test_dns_methods_are_green or test_noraise_dns_tcp"
# These are flaky inside the OBS environment
skiptests+=" or test_fork_after_monkey_patch or test_send_1k_req_rep or test_cpu_usage_after_bind"
# tracebacks in denosed suite with pytest inside obs presumably work different than when upstream is running nose?
skiptests+=" or test_leakage_from_tracebacks"
# it is racy, see: https://lore.kernel.org/all/CADVnQy=AnJY9NZ3w_xNghEG80-DhsXL0r_vEtkr=dmz0ugcoVw@mail.gmail.com/ (bsc#1202188)
skiptests+=" or test_018b_http_10_keepalive_framing"
# Unknown Python 3.6 specific errors
# TypeError: _wrap_socket() argument 1 must be _socket.socket, not SSLSocket
# https://github.com/rthalley/dnspython/issues/559#issuecomment-675274960
python36_skiptests+=" or test_connect_ssl or test_ssl_sending_messages or test_wrap_ssl"
python36_skiptests+=" or ssl_test or wsgi_test"
%if %python3_version_nodots == 36
python3_skiptests+="$python36_skiptests"
%endif
# https://github.com/eventlet/eventlet/issues/730
python310_skiptests+=" or test_patcher_existing_locks_locked"
# https://github.com/eventlet/eventlet/issues/739
python310_skiptests+=" or test_017_ssl_zeroreturnerror"
# no subdir recursion https://github.com/eventlet/eventlet/issues/638#issuecomment-676085599
%pytest -o norecursedirs="tests/*" -k "not ($skiptests ${$python_skiptests})" ${$python_pytest_param}
%files %{python_files}
%license LICENSE
%doc AUTHORS NEWS README.rst
%{python_sitelib}/eventlet
%{python_sitelib}/eventlet-%{version}*-info
%changelog