[packages/python-eventlet] - updated to 0.25.1 - added monotonic patch (use time.monotonic on Python 3 instead of monotonic.mon

qboosh qboosh at pld-linux.org
Tue Jan 7 17:57:56 CET 2020


commit 6d7c3a3eedbc6bf7ac6c7dbbf1d1321ed1df738a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jan 7 17:57:53 2020 +0100

    - updated to 0.25.1
    - added monotonic patch (use time.monotonic on Python 3 instead of monotonic.monotonic)
    - all tests are passing for me now

 python-eventlet-monotonic.patch | 50 +++++++++++++++++++++++++++++++++++++++++
 python-eventlet.spec            | 38 ++++++++++++++-----------------
 2 files changed, 67 insertions(+), 21 deletions(-)
---
diff --git a/python-eventlet.spec b/python-eventlet.spec
index 222bdb9..d2a13b1 100644
--- a/python-eventlet.spec
+++ b/python-eventlet.spec
@@ -1,43 +1,44 @@
-# TODO: fix green.ssl on Python 3.7
 #
 # Conditional build:
 %bcond_without	doc		# Sphinx documentation
-%bcond_with	tests		# unit tests [failures with python3.7: green.ssl is broken there, as of 0.23.0]
+%bcond_without	tests		# unit tests
 %bcond_without	python2		# CPython 2.x module
 %bcond_without	python3		# CPython 3.x module
 
 Summary:	Highly concurrent networking library for Python 2
 Summary(pl.UTF-8):	Biblioteka sieciowa o dużym stopniu zrównoleglenia dla Pythona 2
 Name:		python-eventlet
-Version:	0.23.0
-Release:	4
+Version:	0.25.1
+Release:	1
 License:	MIT
 Group:		Development/Languages/Python
 #Source0Download: https://pypi.org/simple/eventlet/
 Source0:	https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
-# Source0-md5:	9b459a4d3b1365febd0d22cf71b9e7ce
+# Source0-md5:	8d7145af6506d5418c5a6bee7bf0b7e7
+Patch0:		%{name}-monotonic.patch
 URL:		https://pypi.org/project/eventlet/
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
-BuildRequires:	sed >= 4.0
 %if %{with python2}
-BuildRequires:	python-devel >= 1:2.6
-BuildRequires:	python-setuptools >= 5.4.1
+BuildRequires:	python-devel >= 1:2.7
+BuildRequires:	python-setuptools >= 1:5.4.1
 %if %{with tests}
+BuildRequires:	python-dns >= 1.15.0
 BuildRequires:	python-enum34
 BuildRequires:	python-greenlet >= 0.3
+BuildRequires:	python-monotonic >= 1.4
 BuildRequires:	python-nose >= 1.3.1
+BuildRequires:	python-six >= 1.10.0
 %endif
 %endif
 %if %{with python3}
-BuildRequires:	python3-devel >= 1:3.3
-BuildRequires:	python3-setuptools >= 5.4.1
+BuildRequires:	python3-devel >= 1:3.4
+BuildRequires:	python3-setuptools >= 1:5.4.1
 %if %{with tests}
-%if "%{py3_ver}" < "3.4"
-BuildRequires:	python3-enum34
-%endif
+BuildRequires:	python3-dns >= 1.15.0
 BuildRequires:	python3-greenlet >= 0.3
 BuildRequires:	python3-nose >= 1.3.1
+BuildRequires:	python3-six >= 1.10.0
 %endif
 %endif
 %{?with_doc:BuildRequires:	sphinx-pdg}
@@ -45,7 +46,7 @@ BuildRequires:	python3-nose >= 1.3.1
 # SO_REUSEPORT option for tests.convenience_test.test_socket_reuse
 BuildRequires:	uname(release) >= 3.9
 %endif
-Requires:	python-modules >= 1:2.6
+Requires:	python-modules >= 1:2.7
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -74,7 +75,7 @@ interpretera Pythona lub jako małej części dużej aplikacji.
 Summary:	Highly concurrent networking library for Python 3
 Summary(pl.UTF-8):	Biblioteka sieciowa o dużym stopniu zrównoleglenia dla Pythona 3
 Group:		Development/Languages/Python
-Requires:	python3-modules >= 1:3.3
+Requires:	python3-modules >= 1:3.4
 
 %description -n python3-eventlet
 Eventlet is a concurrent networking library for Python that allows you
@@ -114,6 +115,7 @@ Dokumentacja API modułu eventlet.
 
 %prep
 %setup -q -n eventlet-%{version}
+%patch0 -p1
 
 %build
 %if %{with python2}
@@ -150,12 +152,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %if %{with python3}
 %py3_install
-
-%if "%{py3_ver}" >= "3.4"
-# don't require enum34 on python >= 3.4 (different forms depending on setuptools version)
-%{__sed} -i -e '/^\[:python_version *< *"3\.4"]/,$ d' \
-	-e '/^enum34;python_version<"3\.4"/d' $RPM_BUILD_ROOT%{py3_sitescriptdir}/eventlet-%{version}-py*.egg-info/requires.txt
-%endif
 %endif
 
 %clean
diff --git a/python-eventlet-monotonic.patch b/python-eventlet-monotonic.patch
new file mode 100644
index 0000000..0eac468
--- /dev/null
+++ b/python-eventlet-monotonic.patch
@@ -0,0 +1,50 @@
+--- eventlet-0.25.1/eventlet/__init__.py.orig	2019-08-21 23:29:28.000000000 +0200
++++ eventlet-0.25.1/eventlet/__init__.py	2020-01-07 05:30:11.537444971 +0100
+@@ -21,8 +21,11 @@
+     # Helpful when CPython < 3.5 on Linux blocked in `os.waitpid(-1)` before first use of hub.
+     # Example: gunicorn
+     # https://github.com/eventlet/eventlet/issues/401#issuecomment-327500352
+-    import monotonic
+-    del monotonic
++    try:
++        import monotonic
++        del monotonic
++    except ImportError:
++        pass
+ 
+     connect = convenience.connect
+     listen = convenience.listen
+--- eventlet-0.25.1/eventlet/hubs/hub.py.orig	2019-05-24 11:00:38.000000000 +0200
++++ eventlet-0.25.1/eventlet/hubs/hub.py	2020-01-07 05:30:59.527184988 +0100
+@@ -22,7 +22,10 @@
+ import eventlet.hubs
+ from eventlet.hubs import timer
+ from eventlet.support import greenlets as greenlet, clear_sys_exc_info
+-import monotonic
++try:
++    from monotonic import monotonic
++except ImportError:
++    from time import monotonic
+ import six
+ 
+ g_prevent_multiple_readers = True
+@@ -120,7 +123,7 @@
+         self.closed = []
+ 
+         if clock is None:
+-            clock = monotonic.monotonic
++            clock = monotonic
+         self.clock = clock
+ 
+         self.greenlet = greenlet.greenlet(self.run)
+--- eventlet-0.25.1/setup.py.orig	2020-01-07 05:31:16.320427345 +0100
++++ eventlet-0.25.1/setup.py	2020-01-07 05:31:19.623742782 +0100
+@@ -18,7 +18,7 @@
+         'dnspython >= 1.15.0',
+         'enum34;python_version<"3.4"',
+         'greenlet >= 0.3',
+-        'monotonic >= 1.4',
++        'monotonic >= 1.4;python_version<"3.3"',
+         'six >= 1.10.0',
+     ),
+     zip_safe=False,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-eventlet.git/commitdiff/6d7c3a3eedbc6bf7ac6c7dbbf1d1321ed1df738a



More information about the pld-cvs-commit mailing list