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_without 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: Development/Languages
26 #Source0Download: https://pypi.org/simple/gevent/
27 Source0: https://files.pythonhosted.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
28 # Source0-md5: 6b9dd98917061803d9158e5258b8f412
29 Patch0: known_failures-pld.patch
30 Patch1: %{name}-py3.8.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.11.5
37 BuildRequires: python-devel >= 1:2.7
38 BuildRequires: python-greenlet-devel >= 0.4.15
40 BuildRequires: python-coverage >= 4.0
41 BuildRequires: python-devel-src >= 1:2.7
42 BuildRequires: python-dns
43 BuildRequires: python-futures
44 BuildRequires: python-greenlet >= 0.4.15
45 BuildRequires: python-mock
46 BuildRequires: python-objgraph
47 BuildRequires: python-psutil
48 BuildRequires: python-requests
49 BuildRequires: python-setuptools >= 1:24.2.0
50 BuildRequires: python-test
51 BuildRequires: python-zope.event
52 BuildRequires: python-zope.interface
56 BuildRequires: python3-Cython >= 0.29
57 BuildRequires: python3-cffi >= 1.11.5
58 BuildRequires: python3-devel >= 1:3.4
59 BuildRequires: python3-greenlet-devel >= 0.4.15
61 BuildRequires: python3-coverage >= 4.0
62 BuildRequires: python3-dns
63 BuildRequires: python3-greenlet >= 0.4.15
64 BuildRequires: python3-objgraph
65 BuildRequires: python3-psutil
66 BuildRequires: python3-requests
67 BuildRequires: python3-setuptools >= 1:24.2.0
68 BuildRequires: python3-test
69 BuildRequires: python3-zope.event
70 BuildRequires: python3-zope.interface
73 BuildRequires: rpm-pythonprov
74 BuildRequires: rpmbuild(macros) >= 1.714
76 BuildRequires: python3-repoze.sphinx.autointerface
77 BuildRequires: sphinx-pdg
79 %{?with_system_libev:Requires: libev >= 4.23}
80 Requires: python-greenlet >= 0.4.15
81 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
84 gevent is a coroutine-based Python networking library. Features
86 - Fast event loop based on libev.
87 - Lightweight execution units based on greenlet.
88 - Familiar API that re-uses concepts from the Python standard library.
89 - Cooperative sockets with SSL support.
90 - DNS queries performed through c-ares or a threadpool.
91 - Ability to use standard library and 3rd party modules written for
92 standard blocking sockets.
94 %description -l pl.UTF-8
95 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
97 - szybka pętla zdarzeń oparta na libev
98 - lekkie jednostki wykonywania oparte na bibliotece greenlet
99 - znajome API wykorzystujące koncepty biblioteki standardowej Pythona
100 - gniazda kooperatywne z obsługą SSL
101 - zapytania DNS wykonywane przez bibliotekę c-ares lub pulę wątków
102 - możliwość wykorzystania biblioteki standardowej lub modułów innych
103 producentów napisanych dla standardowych gniazd blokujących
105 %package -n python3-%{module}
106 Summary: A coroutine-based Python 3 networking library
107 Summary(pl.UTF-8): Biblioteka sieciowa dla Pythona 3 oparta na korutynach
108 Group: Libraries/Python
109 %{?with_system_libev:Requires: libev >= 4.23}
110 Requires: python-greenlet >= 0.4.15
112 %description -n python3-%{module}
113 gevent is a coroutine-based Python networking library. Features
115 - Fast event loop based on libev.
116 - Lightweight execution units based on greenlet.
117 - Familiar API that re-uses concepts from the Python standard library.
118 - Cooperative sockets with SSL support.
119 - DNS queries performed through c-ares or a threadpool.
120 - Ability to use standard library and 3rd party modules written for
121 standard blocking sockets
123 %description -n python3-%{module} -l pl.UTF-8
124 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
126 - szybka pętla zdarzeń oparta na libev
127 - lekkie jednostki wykonywania oparte na bibliotece greenlet
128 - znajome API wykorzystujące koncepty biblioteki standardowej Pythona
129 - gniazda kooperatywne z obsługą SSL
130 - zapytania DNS wykonywane przez bibliotekę c-ares lub pulę wątków
131 - możliwość wykorzystania biblioteki standardowej lub modułów innych
132 producentów napisanych dla standardowych gniazd blokujących
135 Summary: API documentation for Python gevent module
136 Summary(pl.UTF-8): Dokumentacja API modułu Pythona gevent
140 API documentation for Python gevent module.
142 %description apidocs -l pl.UTF-8
143 Dokumentacja API modułu Pythona gevent.
146 %setup -q -n %{module}-%{version}
150 find . -type f -name '*.orig' | xargs -r %{__rm}
152 # force rebuild of Cython-generated files
153 # they depend on specific deps (e.g. greenlet) versions
154 %{__rm} src/gevent/{*.c,resolver/cares.c}
157 # must be exported to work (py*_build macro is not single invocation)
158 %{?with_system_libev:export LIBEV_EMBED=false}
159 %{?with_system_c_ares:export CARES_EMBED=false}
165 PYTHONPATH=$(echo $PWD/build-2/lib.*) \
166 %{__python} -m gevent.tests
174 PYTHONPATH=$(echo $PWD/build-3/lib.*) \
175 %{__python3} -m gevent.tests
180 PYTHONPATH=$(echo $PWD/build-2/lib.*) \
181 %{__make} -C doc html \
182 SPHINXBUILD=sphinx-build-2
186 rm -rf $RPM_BUILD_ROOT
188 %{?with_system_libev:export LIBEV_EMBED=false}
189 %{?with_system_c_ares:export CARES_EMBED=false}
195 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/*.{c,html}
196 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/*/*.{c,h,html,pyx}
197 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/gevent/{testing,tests}
203 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/*.{c,html}
204 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/*/*.{c,h,html,pyx}
205 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/gevent/{testing,tests}
209 rm -rf $RPM_BUILD_ROOT
213 %defattr(644,root,root,755)
214 %doc AUTHORS CHANGES.rst LICENSE NOTICE README.rst TODO
215 %dir %{py_sitedir}/gevent
216 %attr(755,root,root) %{py_sitedir}/gevent/*.so
217 %{py_sitedir}/gevent/*.pxd
218 %{py_sitedir}/gevent/*.py[co]
219 %dir %{py_sitedir}/gevent/_ffi
220 %{py_sitedir}/gevent/_ffi/*.py[co]
221 %dir %{py_sitedir}/gevent/libev
222 %attr(755,root,root) %{py_sitedir}/gevent/libev/_corecffi.so
223 %attr(755,root,root) %{py_sitedir}/gevent/libev/corecext.so
224 %{py_sitedir}/gevent/libev/libev.pxd
225 %{py_sitedir}/gevent/libev/*.py[co]
226 %dir %{py_sitedir}/gevent/libuv
227 %{py_sitedir}/gevent/libuv/*.py[co]
228 %attr(755,root,root) %{py_sitedir}/gevent/libuv/_corecffi.so
229 %dir %{py_sitedir}/gevent/resolver
230 %{py_sitedir}/gevent/resolver/libcares.pxd
231 %{py_sitedir}/gevent/resolver/*.py[co]
232 %attr(755,root,root) %{py_sitedir}/gevent/resolver/cares.so
233 %{py_sitedir}/gevent-%{version}-py%{py_ver}.egg-info
237 %files -n python3-%{module}
238 %defattr(644,root,root,755)
239 %doc AUTHORS CHANGES.rst LICENSE NOTICE README.rst TODO
240 %dir %{py3_sitedir}/gevent
241 %attr(755,root,root) %{py3_sitedir}/gevent/*.cpython-*.so
242 %{py3_sitedir}/gevent/__pycache__
243 %{py3_sitedir}/gevent/*.pxd
244 %{py3_sitedir}/gevent/*.py
245 %dir %{py3_sitedir}/gevent/_ffi
246 %{py3_sitedir}/gevent/_ffi/__pycache__
247 %{py3_sitedir}/gevent/_ffi/*.py
248 %dir %{py3_sitedir}/gevent/libuv
249 %{py3_sitedir}/gevent/libuv/__pycache__
250 %{py3_sitedir}/gevent/libuv/*.py
251 %attr(755,root,root) %{py3_sitedir}/gevent/libuv/_corecffi.*.so
252 %dir %{py3_sitedir}/gevent/libev
253 %attr(755,root,root) %{py3_sitedir}/gevent/libev/_corecffi.abi3.so
254 %attr(755,root,root) %{py3_sitedir}/gevent/libev/corecext.cpython-*.so
255 %{py3_sitedir}/gevent/libev/__pycache__
256 %{py3_sitedir}/gevent/libev/libev.pxd
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 %{py3_sitedir}/gevent/resolver/libcares.pxd
262 %attr(755,root,root) %{py3_sitedir}/gevent/resolver/cares.*.so
263 %{py3_sitedir}/gevent-%{version}-py*.egg-info
268 %defattr(644,root,root,755)
269 %doc doc/_build/html/{_modules,_static,api,examples,*.html,*.js}