2010-12-04 15:53:00 +00:00
|
|
|
#
|
2011-02-03 08:43:01 +00:00
|
|
|
# spec file for package python-eventlet
|
2010-12-04 15:53:00 +00:00
|
|
|
#
|
2022-06-04 15:24:42 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2010-12-04 15:53:00 +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
|
2011-09-02 11:41:27 +00:00
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
2010-12-04 15:53:00 +00:00
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2011-09-05 15:03:51 +00:00
|
|
|
|
2018-12-04 13:26:03 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-09-02 11:41:27 +00:00
|
|
|
#
|
2010-12-04 15:53:00 +00:00
|
|
|
|
2011-09-05 15:03:51 +00:00
|
|
|
|
2017-09-05 09:39:53 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2021-12-21 23:36:25 +00:00
|
|
|
%bcond_without python2
|
2010-12-04 15:53:00 +00:00
|
|
|
Name: python-eventlet
|
2022-12-03 07:20:11 +00:00
|
|
|
Version: 0.33.2
|
2012-11-23 11:00:07 +00:00
|
|
|
Release: 0
|
2017-09-06 07:26:00 +00:00
|
|
|
Summary: Concurrent networking library for Python
|
2010-12-04 15:53:00 +00:00
|
|
|
License: MIT
|
2011-09-02 11:41:27 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-12-04 17:12:58 +00:00
|
|
|
URL: http://eventlet.net
|
2017-09-05 09:39:53 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
|
2020-08-13 16:09:43 +00:00
|
|
|
# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#eventlet/eventlet#638 mcepl@suse.com
|
|
|
|
# Removes dependency on nose
|
2021-12-21 23:36:25 +00:00
|
|
|
Patch0: denose-eventlet.patch
|
2021-03-24 21:32:46 +00:00
|
|
|
# PATCH-FIX-UPSTREAM newdnspython.patch mcepl@suse.com -- patch is from gh#rthalley/dnspython#519, discussion in gh#eventlet/eventlet#638
|
2020-08-14 21:30:58 +00:00
|
|
|
Patch1: newdnspython.patch
|
2021-12-28 11:52:17 +00:00
|
|
|
# PATCH-FIX-UPSTREAM https://github.com/eventlet/eventlet/pull/643
|
|
|
|
Patch2: python-eventlet-FTBFS2028.patch
|
2017-09-05 09:39:53 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2021-12-21 23:36:25 +00:00
|
|
|
%if %{with python2}
|
2020-12-08 23:59:29 +00:00
|
|
|
BuildRequires: python2-monotonic >= 1.4
|
|
|
|
%endif
|
2017-10-06 08:09:41 +00:00
|
|
|
BuildRequires: fdupes
|
2017-09-05 09:39:53 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2021-03-24 21:32:46 +00:00
|
|
|
# SECTION TEST requirements
|
2018-01-15 19:18:09 +00:00
|
|
|
# eventlet parses /etc/protocols which is not available in normal build envs
|
2022-12-09 13:10:17 +00:00
|
|
|
BuildRequires: netcfg
|
2021-03-24 21:32:46 +00:00
|
|
|
BuildRequires: %{python_module dnspython >= 1.15.0}
|
|
|
|
BuildRequires: %{python_module greenlet >= 0.3}
|
2021-11-07 21:14:19 +00:00
|
|
|
%if 0%{?suse_version} >= 1550
|
2021-03-24 21:32:46 +00:00
|
|
|
BuildRequires: %{python_module pyOpenSSL}
|
2021-11-07 21:14:19 +00:00
|
|
|
%endif
|
2021-03-24 21:32:46 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module pyzmq}
|
|
|
|
BuildRequires: %{python_module six >= 1.10.0}
|
|
|
|
BuildRequires: %{python_module testsuite}
|
|
|
|
# /SECTION
|
2018-01-15 19:17:25 +00:00
|
|
|
Requires: netcfg
|
2020-08-17 07:50:02 +00:00
|
|
|
Requires: python-dnspython >= 1.15.0
|
2015-01-08 17:34:56 +00:00
|
|
|
Requires: python-greenlet >= 0.3
|
2020-12-08 23:59:29 +00:00
|
|
|
%ifpython2
|
2018-12-06 15:44:37 +00:00
|
|
|
Requires: python-monotonic >= 1.4
|
2020-12-08 23:59:29 +00:00
|
|
|
%endif
|
2018-12-06 15:44:37 +00:00
|
|
|
Requires: python-six >= 1.10.0
|
2010-12-04 15:53:00 +00:00
|
|
|
BuildArch: noarch
|
2017-09-05 09:39:53 +00:00
|
|
|
%python_subpackages
|
2010-12-04 15:53:00 +00:00
|
|
|
|
|
|
|
%description
|
2017-09-06 07:26:00 +00:00
|
|
|
Eventlet is a concurrent networking library for Python that allows
|
|
|
|
changing how code is run.
|
2011-09-02 11:41:27 +00:00
|
|
|
|
2017-09-06 07:26:00 +00:00
|
|
|
It uses epoll or libevent for scalable non-blocking I/O. Coroutines
|
2011-09-02 11:41:27 +00:00
|
|
|
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
|
2017-09-06 07:26:00 +00:00
|
|
|
is implicit, which means Eventlet can be used from the Python
|
|
|
|
interpreter, or as part of a larger application.
|
2010-12-04 15:53:00 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n eventlet-%{version}
|
2020-08-13 16:09:43 +00:00
|
|
|
%autopatch -p1
|
|
|
|
|
2021-03-24 21:32:46 +00:00
|
|
|
# Fix non-executable script
|
|
|
|
sed -i '1{/^#!/ d}' eventlet/support/greendns.py
|
2020-08-18 18:36:10 +00:00
|
|
|
|
2010-12-04 15:53:00 +00:00
|
|
|
%build
|
2017-09-05 09:39:53 +00:00
|
|
|
%python_build
|
2010-12-04 15:53:00 +00:00
|
|
|
|
|
|
|
%install
|
2017-09-05 09:39:53 +00:00
|
|
|
%python_install
|
2018-12-06 13:26:54 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2010-12-04 15:53:00 +00:00
|
|
|
|
2019-06-07 12:27:52 +00:00
|
|
|
%check
|
2020-08-20 07:24:29 +00:00
|
|
|
# python2 is required to build for Leap, but tests fail (even upstream)
|
2020-12-08 23:59:29 +00:00
|
|
|
python2_pytest_param='--collect-only'
|
2020-08-20 07:24:29 +00:00
|
|
|
# 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"
|
2020-12-11 13:36:00 +00:00
|
|
|
# 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"
|
2021-12-21 23:36:25 +00:00
|
|
|
# tracebacks in denosed suite with pytest inside obs presumably work different than when upstream is running nose?
|
|
|
|
skiptests+=" or test_leakage_from_tracebacks"
|
2022-11-11 11:35:46 +00:00
|
|
|
# temporarily disable to build with OpenSSL 3.0 bsc#1205042
|
|
|
|
skiptests+=" or test_017_ssl_zeroreturnerror"
|
2022-08-19 06:51:10 +00:00
|
|
|
# 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"
|
2020-08-20 07:24:29 +00:00
|
|
|
|
2020-12-08 23:59:29 +00:00
|
|
|
# Unknown Python 3.6 specific errors
|
2020-08-20 07:24:29 +00:00
|
|
|
# TypeError: _wrap_socket() argument 1 must be _socket.socket, not SSLSocket
|
|
|
|
# https://github.com/rthalley/dnspython/issues/559#issuecomment-675274960
|
2020-12-08 23:59:29 +00:00
|
|
|
python36_skiptests+=" or test_connect_ssl or test_ssl_sending_messages or test_wrap_ssl"
|
|
|
|
python36_skiptests+=" or ssl_test or wsgi_test"
|
2020-08-20 07:24:29 +00:00
|
|
|
%if %python3_version_nodots == 36
|
2020-12-08 23:59:29 +00:00
|
|
|
python3_skiptests+="$python36_skiptests"
|
2020-08-20 07:24:29 +00:00
|
|
|
%endif
|
2021-12-21 23:36:25 +00:00
|
|
|
# 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"
|
2020-08-20 07:24:29 +00:00
|
|
|
# no subdir recursion https://github.com/eventlet/eventlet/issues/638#issuecomment-676085599
|
2020-12-08 23:59:29 +00:00
|
|
|
%pytest -o norecursedirs="tests/*" -k "not ($skiptests ${$python_skiptests})" ${$python_pytest_param}
|
2019-06-07 12:27:52 +00:00
|
|
|
|
2017-09-05 09:39:53 +00:00
|
|
|
%files %{python_files}
|
2018-12-04 17:12:58 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc AUTHORS NEWS README.rst
|
2020-12-08 23:59:29 +00:00
|
|
|
%{python_sitelib}/eventlet
|
|
|
|
%{python_sitelib}/eventlet-%{version}*-info
|
2010-12-04 15:53:00 +00:00
|
|
|
|
|
|
|
%changelog
|