3 # - test__core_stat.py fails on 32-bit builds with system libev
4 # investigate/fix that and enable system libev
6 # - investigate some other failing tests
7 # (now excluded via known_failures-pld.patch)
10 %bcond_without doc # Sphinx documentation
11 %bcond_with tests # testing
12 %bcond_with system_libev # system libev [test__core_stat.py test fails]
13 %bcond_without system_c_ares # system c_ares
14 %bcond_without python2 # CPython 2.x module
15 %bcond_without python3 # CPython 3.x module
18 Summary: A coroutine-based Python 2 networking library
19 Summary(pl.UTF-8): Biblioteka sieciowa dla Pythona 2 oparta na korutynach
20 Name: python-%{module}
25 Group: Libraries/Python
26 #Source0Download: https://pypi.org/simple/gevent/
27 Source0: https://files.pythonhosted.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
28 # Source0-md5: 84014946a25407706cbe9ecb088f1e9c
29 Patch0: %{name}-sphinx-python3.patch
30 Patch1: known_failures-pld.patch
31 URL: http://www.gevent.org/
32 %{?with_system_c_ares:BuildRequires: c-ares-devel >= 1.10.0}
33 %{?with_system_libev:BuildRequires: libev-devel >= 4.23}
35 BuildRequires: python-Cython >= 0.29
36 BuildRequires: python-cffi >= 1.12.2
37 BuildRequires: python-devel >= 1:2.7
38 BuildRequires: python-greenlet-devel >= 1.1.0
39 BuildRequires: python-greenlet-devel < 2
40 BuildRequires: python-setuptools >= 1:24.2.0
42 BuildRequires: python-coverage >= 4.0
43 BuildRequires: python-devel-src >= 1:2.7
44 BuildRequires: python-dns >= 1.16.0
45 BuildRequires: python-dns < 2
46 BuildRequires: python-futures
47 BuildRequires: python-greenlet >= 1.1.0
48 BuildRequires: python-greenlet < 2
49 BuildRequires: python-idna
50 BuildRequires: python-mock
51 BuildRequires: python-objgraph
52 BuildRequires: python-psutil >= 5.7.0
53 BuildRequires: python-requests
54 BuildRequires: python-test
55 BuildRequires: python-zope.event
56 BuildRequires: python-zope.interface
60 BuildRequires: python3-Cython >= 0.29
61 BuildRequires: python3-cffi >= 1.12.2
62 BuildRequires: python3-devel >= 1:3.6
63 BuildRequires: python3-greenlet-devel >= 1.1.0
64 BuildRequires: python3-greenlet-devel < 2
65 BuildRequires: python3-setuptools >= 1:24.2.0
67 BuildRequires: python3-coverage >= 4.0
68 BuildRequires: python3-dns >= 1.16.0
69 #BuildRequires: python3-dns < 2
70 BuildRequires: python3-greenlet >= 1.1.0
71 BuildRequires: python3-greenlet < 2
72 BuildRequires: python3-idna
73 BuildRequires: python3-objgraph
74 BuildRequires: python3-psutil >= 5.7.0
75 BuildRequires: python3-requests
76 BuildRequires: python3-test
77 BuildRequires: python3-zope.event
78 BuildRequires: python3-zope.interface
81 BuildRequires: rpm-pythonprov
82 BuildRequires: rpmbuild(macros) >= 1.714
84 BuildRequires: python3-repoze.sphinx.autointerface
85 BuildRequires: python3-sphinxcontrib-programoutput
86 BuildRequires: sphinx-pdg-3
88 %{?with_system_libev:Requires: libev >= 4.23}
89 Requires: python-greenlet >= 1.1.0
90 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
93 gevent is a coroutine-based Python networking library. Features
95 - Fast event loop based on libev.
96 - Lightweight execution units based on greenlet.
97 - Familiar API that re-uses concepts from the Python standard library.
98 - Cooperative sockets with SSL support.
99 - DNS queries performed through c-ares or a threadpool.
100 - Ability to use standard library and 3rd party modules written for
101 standard blocking sockets.
103 %description -l pl.UTF-8
104 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
106 - szybka pętla zdarzeń oparta na libev
107 - lekkie jednostki wykonywania oparte na bibliotece greenlet
108 - znajome API wykorzystujące koncepty biblioteki standardowej Pythona
109 - gniazda kooperatywne z obsługą SSL
110 - zapytania DNS wykonywane przez bibliotekę c-ares lub pulę wątków
111 - możliwość wykorzystania biblioteki standardowej lub modułów innych
112 producentów napisanych dla standardowych gniazd blokujących
114 %package -n python3-%{module}
115 Summary: A coroutine-based Python 3 networking library
116 Summary(pl.UTF-8): Biblioteka sieciowa dla Pythona 3 oparta na korutynach
117 Group: Libraries/Python
118 %{?with_system_libev:Requires: libev >= 4.23}
119 Requires: python-greenlet >= 1.1.0
121 %description -n python3-%{module}
122 gevent is a coroutine-based Python networking library. Features
124 - Fast event loop based on libev.
125 - Lightweight execution units based on greenlet.
126 - Familiar API that re-uses concepts from the Python standard library.
127 - Cooperative sockets with SSL support.
128 - DNS queries performed through c-ares or a threadpool.
129 - Ability to use standard library and 3rd party modules written for
130 standard blocking sockets
132 %description -n python3-%{module} -l pl.UTF-8
133 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
135 - szybka pętla zdarzeń oparta na libev
136 - lekkie jednostki wykonywania oparte na bibliotece greenlet
137 - znajome API wykorzystujące koncepty biblioteki standardowej Pythona
138 - gniazda kooperatywne z obsługą SSL
139 - zapytania DNS wykonywane przez bibliotekę c-ares lub pulę wątków
140 - możliwość wykorzystania biblioteki standardowej lub modułów innych
141 producentów napisanych dla standardowych gniazd blokujących
144 Summary: API documentation for Python gevent module
145 Summary(pl.UTF-8): Dokumentacja API modułu Pythona gevent
149 API documentation for Python gevent module.
151 %description apidocs -l pl.UTF-8
152 Dokumentacja API modułu Pythona gevent.
155 %setup -q -n %{module}-%{version}
159 find . -type f -name '*.orig' | xargs -r %{__rm}
161 # force rebuild of Cython-generated files
162 # they depend on specific deps (e.g. greenlet) versions
163 %{__rm} src/gevent/{*.c,resolver/cares.c}
166 # must be exported to work (py*_build macro is not single invocation)
167 %{?with_system_libev:export LIBEV_EMBED=false}
168 %{?with_system_c_ares:export CARES_EMBED=false}
174 PYTHONPATH=$(echo $PWD/build-2/lib.*) \
175 %{__python} -m gevent.tests
183 PYTHONPATH=$(echo $PWD/build-3/lib.*) \
184 %{__python3} -m gevent.tests
189 PYTHONPATH=$(echo $PWD/build-3/lib.*) \
190 %{__make} -C docs html \
191 SPHINXBUILD=sphinx-build-3
195 rm -rf $RPM_BUILD_ROOT
197 %{?with_system_libev:export LIBEV_EMBED=false}
198 %{?with_system_c_ares:export CARES_EMBED=false}
204 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/gevent/{testing,tests}
210 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/gevent/{testing,tests}
214 rm -rf $RPM_BUILD_ROOT
218 %defattr(644,root,root,755)
219 %doc AUTHORS CHANGES.rst LICENSE NOTICE README.rst TODO
220 %dir %{py_sitedir}/gevent
221 %attr(755,root,root) %{py_sitedir}/gevent/*.so
222 %{py_sitedir}/gevent/*.py[co]
223 %dir %{py_sitedir}/gevent/_ffi
224 %{py_sitedir}/gevent/_ffi/*.py[co]
225 %dir %{py_sitedir}/gevent/libev
226 %attr(755,root,root) %{py_sitedir}/gevent/libev/_corecffi.so
227 %attr(755,root,root) %{py_sitedir}/gevent/libev/corecext.so
228 %{py_sitedir}/gevent/libev/*.py[co]
229 %dir %{py_sitedir}/gevent/libuv
230 %{py_sitedir}/gevent/libuv/*.py[co]
231 %attr(755,root,root) %{py_sitedir}/gevent/libuv/_corecffi.so
232 %dir %{py_sitedir}/gevent/resolver
233 %{py_sitedir}/gevent/resolver/*.py[co]
234 %attr(755,root,root) %{py_sitedir}/gevent/resolver/cares.so
235 %{py_sitedir}/gevent-%{version}-py%{py_ver}.egg-info
239 %files -n python3-%{module}
240 %defattr(644,root,root,755)
241 %doc AUTHORS CHANGES.rst LICENSE NOTICE README.rst TODO
242 %dir %{py3_sitedir}/gevent
243 %attr(755,root,root) %{py3_sitedir}/gevent/*.cpython-*.so
244 %{py3_sitedir}/gevent/__pycache__
245 %{py3_sitedir}/gevent/*.py
246 %dir %{py3_sitedir}/gevent/_ffi
247 %{py3_sitedir}/gevent/_ffi/__pycache__
248 %{py3_sitedir}/gevent/_ffi/*.py
249 %dir %{py3_sitedir}/gevent/libuv
250 %{py3_sitedir}/gevent/libuv/__pycache__
251 %{py3_sitedir}/gevent/libuv/*.py
252 %attr(755,root,root) %{py3_sitedir}/gevent/libuv/_corecffi.*.so
253 %dir %{py3_sitedir}/gevent/libev
254 %attr(755,root,root) %{py3_sitedir}/gevent/libev/_corecffi.abi3.so
255 %attr(755,root,root) %{py3_sitedir}/gevent/libev/corecext.cpython-*.so
256 %{py3_sitedir}/gevent/libev/__pycache__
257 %{py3_sitedir}/gevent/libev/*.py
258 %dir %{py3_sitedir}/gevent/resolver
259 %{py3_sitedir}/gevent/resolver/__pycache__
260 %{py3_sitedir}/gevent/resolver/*.py
261 %attr(755,root,root) %{py3_sitedir}/gevent/resolver/cares.*.so
262 %{py3_sitedir}/gevent-%{version}-py*.egg-info
267 %defattr(644,root,root,755)
268 %doc docs/_build/html/{_modules,_static,api,development,examples,*.html,*.js}