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: 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: cd15fb75e67892514fbba2111af5cd50
29 Patch0: known_failures-pld.patch
30 URL: http://www.gevent.org/
31 %{?with_system_c_ares:BuildRequires: c-ares-devel >= 1.10.0}
32 %{?with_system_libev:BuildRequires: libev-devel >= 4.23}
34 BuildRequires: python-Cython >= 0.29
35 BuildRequires: python-cffi >= 1.11.5
36 BuildRequires: python-devel >= 1:2.7
37 BuildRequires: python-greenlet-devel >= 0.4.15
39 BuildRequires: python-coverage >= 4.0
40 BuildRequires: python-devel-src >= 1:2.7
41 BuildRequires: python-dns
42 BuildRequires: python-futures
43 BuildRequires: python-greenlet >= 0.4.15
44 BuildRequires: python-mock
45 BuildRequires: python-objgraph
46 BuildRequires: python-psutil
47 BuildRequires: python-requests
48 BuildRequires: python-setuptools >= 1:24.2.0
49 BuildRequires: python-test
50 BuildRequires: python-zope.event
51 BuildRequires: python-zope.interface
55 BuildRequires: python3-Cython >= 0.29
56 BuildRequires: python3-cffi >= 1.11.5
57 BuildRequires: python3-devel >= 1:3.4
58 BuildRequires: python3-greenlet-devel >= 0.4.15
60 BuildRequires: python3-coverage >= 4.0
61 BuildRequires: python3-dns
62 BuildRequires: python3-greenlet >= 0.4.15
63 BuildRequires: python3-objgraph
64 BuildRequires: python3-psutil
65 BuildRequires: python3-requests
66 BuildRequires: python3-setuptools >= 1:24.2.0
67 BuildRequires: python3-test
68 BuildRequires: python3-zope.event
69 BuildRequires: python3-zope.interface
72 BuildRequires: rpm-pythonprov
73 BuildRequires: rpmbuild(macros) >= 1.714
75 BuildRequires: python3-repoze.sphinx.autointerface
76 BuildRequires: python3-sphinxcontrib-programoutput
77 BuildRequires: sphinx-pdg-3
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}
149 find . -type f -name '*.orig' | xargs -r %{__rm}
151 # force rebuild of Cython-generated files
152 # they depend on specific deps (e.g. greenlet) versions
153 %{__rm} src/gevent/{*.c,resolver/cares.c}
156 # must be exported to work (py*_build macro is not single invocation)
157 %{?with_system_libev:export LIBEV_EMBED=false}
158 %{?with_system_c_ares:export CARES_EMBED=false}
164 PYTHONPATH=$(echo $PWD/build-2/lib.*) \
165 %{__python} -m gevent.tests
173 PYTHONPATH=$(echo $PWD/build-3/lib.*) \
174 %{__python3} -m gevent.tests
179 PYTHONPATH=$(echo $PWD/build-3/lib.*) \
180 %{__make} -C docs html \
181 SPHINXBUILD=sphinx-build-3
185 rm -rf $RPM_BUILD_ROOT
187 %{?with_system_libev:export LIBEV_EMBED=false}
188 %{?with_system_c_ares:export CARES_EMBED=false}
194 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/gevent/{testing,tests}
200 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/gevent/{testing,tests}
204 rm -rf $RPM_BUILD_ROOT
208 %defattr(644,root,root,755)
209 %doc AUTHORS CHANGES.rst LICENSE NOTICE README.rst TODO
210 %dir %{py_sitedir}/gevent
211 %attr(755,root,root) %{py_sitedir}/gevent/*.so
212 %{py_sitedir}/gevent/*.py[co]
213 %dir %{py_sitedir}/gevent/_ffi
214 %{py_sitedir}/gevent/_ffi/*.py[co]
215 %dir %{py_sitedir}/gevent/libev
216 %attr(755,root,root) %{py_sitedir}/gevent/libev/_corecffi.so
217 %attr(755,root,root) %{py_sitedir}/gevent/libev/corecext.so
218 %{py_sitedir}/gevent/libev/*.py[co]
219 %dir %{py_sitedir}/gevent/libuv
220 %{py_sitedir}/gevent/libuv/*.py[co]
221 %attr(755,root,root) %{py_sitedir}/gevent/libuv/_corecffi.so
222 %dir %{py_sitedir}/gevent/resolver
223 %{py_sitedir}/gevent/resolver/*.py[co]
224 %attr(755,root,root) %{py_sitedir}/gevent/resolver/cares.so
225 %{py_sitedir}/gevent-%{version}-py%{py_ver}.egg-info
229 %files -n python3-%{module}
230 %defattr(644,root,root,755)
231 %doc AUTHORS CHANGES.rst LICENSE NOTICE README.rst TODO
232 %dir %{py3_sitedir}/gevent
233 %attr(755,root,root) %{py3_sitedir}/gevent/*.cpython-*.so
234 %{py3_sitedir}/gevent/__pycache__
235 %{py3_sitedir}/gevent/*.py
236 %dir %{py3_sitedir}/gevent/_ffi
237 %{py3_sitedir}/gevent/_ffi/__pycache__
238 %{py3_sitedir}/gevent/_ffi/*.py
239 %dir %{py3_sitedir}/gevent/libuv
240 %{py3_sitedir}/gevent/libuv/__pycache__
241 %{py3_sitedir}/gevent/libuv/*.py
242 %attr(755,root,root) %{py3_sitedir}/gevent/libuv/_corecffi.*.so
243 %dir %{py3_sitedir}/gevent/libev
244 %attr(755,root,root) %{py3_sitedir}/gevent/libev/_corecffi.abi3.so
245 %attr(755,root,root) %{py3_sitedir}/gevent/libev/corecext.cpython-*.so
246 %{py3_sitedir}/gevent/libev/__pycache__
247 %{py3_sitedir}/gevent/libev/*.py
248 %dir %{py3_sitedir}/gevent/resolver
249 %{py3_sitedir}/gevent/resolver/__pycache__
250 %{py3_sitedir}/gevent/resolver/*.py
251 %attr(755,root,root) %{py3_sitedir}/gevent/resolver/cares.*.so
252 %{py3_sitedir}/gevent-%{version}-py*.egg-info
257 %defattr(644,root,root,755)
258 %doc docs/_build/html/{_modules,_static,api,examples,*.html,*.js}