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
#
2020-04-29 10:53:18 +00:00
# Copyright (c) 2020 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-%{**}}
2010-12-04 15:53:00 +00:00
Name : python-eventlet
2020-08-13 14:09:44 +00:00
Version : 0.26.1
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
Patch0 : remove_nose.patch
2020-08-14 21:30:58 +00:00
# PATCH-FIX-UPSTREAM newdnspythis patch makes things totally awesomethon.patch gh#eventlet/eventlet#638 mcepl@suse.com
# patch is from gh#rthalley/dnspython#519
Patch1 : newdnspython.patch
2020-08-18 18:36:10 +00:00
# PATCH-FEATURE-UPSTREAM pr_639.patch gh#eventlet/eventlet#639 jayvdb@gmail.com
Patch2 : pr_639.patch
# Really remove the dependency on nose
Patch3 : remove_nose_part_2.patch
2019-06-07 12:27:52 +00:00
BuildRequires : %{python_module dnspython >= 1.15.0}
BuildRequires : %{python_module greenlet >= 0.3}
BuildRequires : %{python_module monotonic >= 1.4}
BuildRequires : %{python_module pyOpenSSL}
2020-08-18 18:36:10 +00:00
BuildRequires : %{python_module pytest}
BuildRequires : %{python_module pyzmq}
2017-09-05 09:39:53 +00:00
BuildRequires : %{python_module setuptools}
2019-06-07 12:27:52 +00:00
BuildRequires : %{python_module six >= 1.10.0}
2020-08-14 21:30:58 +00:00
BuildRequires : %{python_module testsuite}
2017-10-06 08:09:41 +00:00
BuildRequires : fdupes
2019-06-07 12:27:52 +00:00
BuildRequires : netcfg
2017-09-05 09:39:53 +00:00
BuildRequires : python-rpm-macros
2018-01-15 19:18:09 +00:00
# eventlet parses /etc/protocols which is not available in normal build envs
2020-08-13 16:09:43 +00:00
# Tests
BuildRequires : sysconfig-netconfig
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
2018-12-06 15:44:37 +00:00
Requires : python-monotonic >= 1.4
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
2012-11-23 11:00:07 +00:00
sed -i " s | ^ # ! . * | | " eventlet/support/greendns.py # Fix non-executable script
2010-12-04 15:53:00 +00:00
2020-08-18 18:36:10 +00:00
# As of 2020-08, upstream is not running their tests/stdlib tests in CI
# test setup fails
rm \
tests/nosewrapper.py \
tests/stdlib/all.py \
tests/stdlib/all_modules.py \
tests/stdlib/test_SimpleHTTPServer.py \
tests/stdlib/test_httpservers.py \
tests/stdlib/test_socket_ssl.py \
tests/stdlib/test_socketserver.py \
tests/stdlib/test_ssl.py \
tests/stdlib/test_thread__boundedsem.py \
tests/stdlib/test_urllib*.py
# large percentage errors
rm \
tests/backdoor_test.py \
tests/stdlib/test_asyncore.py \
tests/stdlib/test_ftplib.py \
tests/stdlib/test_select.py
# Too slow, possibly hanging
rm \
tests/stdlib/test_queue.py \
tests/stdlib/test_socket.py \
tests/stdlib/test_subprocess.py \
tests/stdlib/test_threading.py
# Unknown openSUSE 15.x specific errors, including a few not in tests/stdlib:
# TypeError: _wrap_socket() argument 1 must be _socket.socket, not SSLSocket
# https://github.com/rthalley/dnspython/issues/559#issuecomment-675274960
if [[ " % p y t h o n 3 _ v e r s i o n _ n o d o t s " == " 3 6 " ]]; then
rm \
tests/api_test.py tests/convenience_test.py tests/ssl_test.py tests/websocket_test.py tests/websocket_new_test.py tests/wsgi_test.py \
tests/stdlib/test_httplib.py tests/stdlib/test_thread.py
fi
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-18 18:36:10 +00:00
export EVENTLET_HUB=selects
# test_raise_dns_tcp and test_noraise_dns_tcp likely minor dnspython 2 incompatibility
# test_dns_methods_are_green fails because socket_resolve_green.py
# emits "name: test-host0. error: [Errno -2] Name or service not known"
# second set of test failures are the stdlib tests
# Python 2 has many failures upstream also, that are not being actively fixed.
# They are mostly related to the test harness, rather than the library.
# e.g. https://github.com/eventlet/eventlet/issues/641
%{python_expand if [[ " $ p y t h o n " != " p y t h o n 2 " ]]; then
export PYTHONPATH=%{buildroot} %{$python_sitelib}
$python -m pytest -rs -vv --ignore tests/manual -k 'not (test_raise_dns_tcp or test_noraise_dns_tcp or test_dns_methods_are_green) and not (test_get_exec_path or test_internal_execvpe_str or test_open_keywords or test_locked_repr or test_repr or test_timeout or test_unraisable_exception or ExceptHookTests or test_interrupt_main_noerror or test_threading_local)'
fi
}
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
2011-09-02 11:41:27 +00:00
%{python_sitelib} /*
2010-12-04 15:53:00 +00:00
%changelog