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 tests # do not run tests
11 %bcond_with system_libev # build with system libev [test__core_stat.py test fails]
12 %bcond_without system_c_ares # build with system c_ares
13 %bcond_without python2 # CPython 2.x module
14 %bcond_without python3 # CPython 3.x module
17 Summary: A coroutine-based Python 2 networking library
18 Summary(pl.UTF-8): Biblioteka sieciowa dla Pythona 2 oparta na korutynach
19 Name: python-%{module}
24 Group: Development/Languages
25 #Source0Download: https://pypi.python.org/simple/gevent
26 Source0: https://files.pythonhosted.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
27 # Source0-md5: 5d3f61ef4bb40fdbd5cbaac7f0d2e585
28 Patch0: known_failures-pld.patch
29 Patch1: %{name}-tests.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}
33 BuildRequires: python-Cython >= 0.28.5
35 BuildRequires: python-cffi >= 1.3.0
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-greenlet >= 0.4.15
42 BuildRequires: python-objgraph
43 BuildRequires: python-setuptools
44 BuildRequires: python-test
48 BuildRequires: python3-cffi >= 1.3.0
49 BuildRequires: python3-devel >= 1:3.3
50 BuildRequires: python3-greenlet-devel >= 0.4.15
52 BuildRequires: python3-coverage >= 4.0
53 BuildRequires: python3-greenlet >= 0.4.10
54 BuildRequires: python3-objgraph
55 BuildRequires: python3-setuptools
56 BuildRequires: python3-test
59 BuildRequires: rpm-pythonprov
60 BuildRequires: rpmbuild(macros) >= 1.714
61 %{?with_system_libev:Requires: libev >= 4.23}
62 Requires: python-greenlet >= 0.4.15
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66 gevent is a coroutine-based Python networking library. Features
68 - Fast event loop based on libev.
69 - Lightweight execution units based on greenlet.
70 - Familiar API that re-uses concepts from the Python standard library.
71 - Cooperative sockets with SSL support.
72 - DNS queries performed through c-ares or a threadpool.
73 - Ability to use standard library and 3rd party modules written for
74 standard blocking sockets.
76 %description -l pl.UTF-8
77 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
79 - szybka pętla zdarzeń oparta na libev
80 - lekkie jednostki wykonywania oparte na bibliotece greenlet
81 - znajome API wykorzystujące koncepty biblioteki standardowej Pythona
82 - gniazda kooperatywne z obsługą SSL
83 - zapytania DNS wykonywane przez bibliotekę c-ares lub pulę wątków
84 - możliwość wykorzystania biblioteki standardowej lub modułów innych
85 producentów napisanych dla standardowych gniazd blokujących
87 %package -n python3-%{module}
88 Summary: A coroutine-based Python 3 networking library
89 Summary(pl.UTF-8): Biblioteka sieciowa dla Pythona 3 oparta na korutynach
90 Group: Libraries/Python
91 %{?with_system_libev:Requires: libev >= 4.23}
92 Requires: python-greenlet >= 0.4.15
94 %description -n python3-%{module}
95 gevent is a coroutine-based Python networking library. Features
97 - Fast event loop based on libev.
98 - Lightweight execution units based on greenlet.
99 - Familiar API that re-uses concepts from the Python standard library.
100 - Cooperative sockets with SSL support.
101 - DNS queries performed through c-ares or a threadpool.
102 - Ability to use standard library and 3rd party modules written for
103 standard blocking sockets
105 %description -n python3-%{module} -l pl.UTF-8
106 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
108 - szybka pętla zdarzeń oparta na libev
109 - lekkie jednostki wykonywania oparte na bibliotece greenlet
110 - znajome API wykorzystujące koncepty biblioteki standardowej Pythona
111 - gniazda kooperatywne z obsługą SSL
112 - zapytania DNS wykonywane przez bibliotekę c-ares lub pulę wątków
113 - możliwość wykorzystania biblioteki standardowej lub modułów innych
114 producentów napisanych dla standardowych gniazd blokujących
117 %setup -q -n %{module}-%{version}
123 # force rebuild of Cython-generated files
124 # they depend on specific deps (e.g. greenlet) versions
125 rm src/gevent/{*.c,resolver/cares.c}
127 # must be exported to work (py*_build macro is not single invocation)
128 %{?with_system_libev:export LIBEV_EMBED=false}
129 %{?with_system_c_ares:export CARES_EMBED=false}
135 PKGDIR=$(echo $PWD/build-2/lib.*)
137 PYTHONPATH=$PKGDIR %{__python} testrunner.py --config known_failures.py
146 PKGDIR=$(echo $PWD/build-3/lib.*)
148 PYTHONPATH=$PKGDIR %{__python3} testrunner.py --config known_failures.py
154 rm -rf $RPM_BUILD_ROOT
156 %{?with_system_libev:export LIBEV_EMBED=false}
157 %{?with_system_c_ares:export CARES_EMBED=false}
163 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/*.c
164 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/*/*.{c,h,pyx}
170 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/*.c
171 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/*/*.{c,h,pyx}
175 rm -rf $RPM_BUILD_ROOT
179 %defattr(644,root,root,755)
180 %doc AUTHORS LICENSE NOTICE README.rst TODO
181 %dir %{py_sitedir}/gevent
182 %attr(755,root,root) %{py_sitedir}/gevent/*.so
183 %{py_sitedir}/gevent/*.pxd
184 %{py_sitedir}/gevent/*.py[co]
185 %dir %{py_sitedir}/gevent/_ffi
186 %{py_sitedir}/gevent/_ffi/*.py[co]
187 %dir %{py_sitedir}/gevent/libev
188 %attr(755,root,root) %{py_sitedir}/gevent/libev/_corecffi.so
189 %attr(755,root,root) %{py_sitedir}/gevent/libev/corecext.so
190 %{py_sitedir}/gevent/libev/libev.pxd
191 %{py_sitedir}/gevent/libev/*.py[co]
192 %dir %{py_sitedir}/gevent/libuv
193 %{py_sitedir}/gevent/libuv/*.py[co]
194 %attr(755,root,root) %{py_sitedir}/gevent/libuv/_corecffi.so
195 %dir %{py_sitedir}/gevent/resolver
196 %{py_sitedir}/gevent/resolver/libcares.pxd
197 %{py_sitedir}/gevent/resolver/*.py[co]
198 %attr(755,root,root) %{py_sitedir}/gevent/resolver/cares.so
199 %{py_sitedir}/gevent-%{version}-py%{py_ver}.egg-info
203 %files -n python3-%{module}
204 %defattr(644,root,root,755)
205 %doc AUTHORS LICENSE NOTICE README.rst TODO
206 %dir %{py3_sitedir}/gevent
207 %attr(755,root,root) %{py3_sitedir}/gevent/*.cpython-*.so
208 %{py3_sitedir}/gevent/__pycache__
209 %{py3_sitedir}/gevent/*.pxd
210 %{py3_sitedir}/gevent/*.py
211 %dir %{py3_sitedir}/gevent/_ffi
212 %{py3_sitedir}/gevent/_ffi/__pycache__
213 %{py3_sitedir}/gevent/_ffi/*.py
214 %dir %{py3_sitedir}/gevent/libuv
215 %{py3_sitedir}/gevent/libuv/__pycache__
216 %{py3_sitedir}/gevent/libuv/*.py
217 %attr(755,root,root) %{py3_sitedir}/gevent/libuv/_corecffi.*.so
218 %dir %{py3_sitedir}/gevent/libev
219 %attr(755,root,root) %{py3_sitedir}/gevent/libev/_corecffi.abi3.so
220 %attr(755,root,root) %{py3_sitedir}/gevent/libev/corecext.cpython-*.so
221 %{py3_sitedir}/gevent/libev/__pycache__
222 %{py3_sitedir}/gevent/libev/libev.pxd
223 %{py3_sitedir}/gevent/libev/*.py
224 %dir %{py3_sitedir}/gevent/resolver
225 %{py3_sitedir}/gevent/resolver/__pycache__
226 %{py3_sitedir}/gevent/resolver/*.py
227 %{py3_sitedir}/gevent/resolver/libcares.pxd
228 %attr(755,root,root) %{py3_sitedir}/gevent/resolver/cares.*.so
229 %{py3_sitedir}/gevent-%{version}-py*.egg-info