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: http://files.pythonhosted.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
27 # Source0-md5: 6700a2433c8e0635425e6798760efc81
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 # if cpython generated files need rebuild
34 #BuildRequires: python-Cython >= 0.25.1
36 BuildRequires: python-cffi >= 1.3.0
37 BuildRequires: python-devel >= 1:2.7
39 BuildRequires: python-coverage >= 4.0
40 BuildRequires: python-devel-src >= 1:2.7
41 BuildRequires: python-greenlet >= 0.4.10
42 BuildRequires: python-setuptools
43 BuildRequires: python-test
47 BuildRequires: python3-cffi >= 1.3.0
48 BuildRequires: python3-devel >= 1:3.3
50 BuildRequires: python3-coverage >= 4.0
51 BuildRequires: python3-greenlet >= 0.4.10
52 BuildRequires: python3-setuptools
53 BuildRequires: python3-test
56 BuildRequires: rpm-pythonprov
57 BuildRequires: rpmbuild(macros) >= 1.714
58 %{?with_system_libev:Requires: libev >= 4.23}
59 Requires: python-greenlet >= 0.4.10
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 gevent is a coroutine-based Python networking library. Features
65 - Fast event loop based on libev.
66 - Lightweight execution units based on greenlet.
67 - Familiar API that re-uses concepts from the Python standard library.
68 - Cooperative sockets with SSL support.
69 - DNS queries performed through c-ares or a threadpool.
70 - Ability to use standard library and 3rd party modules written for
71 standard blocking sockets.
73 %description -l pl.UTF-8
74 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
76 - szybka pętla zdarzeń oparta na libev
77 - lekkie jednostki wykonywania oparte na bibliotece greenlet
78 - znajome API wykorzystujące koncepty biblioteki standardowej Pythona
79 - gniazda kooperatywne z obsługą SSL
80 - zapytania DNS wykonywane przez bibliotekę c-ares lub pulę wątków
81 - możliwość wykorzystania biblioteki standardowej lub modułów innych
82 producentów napisanych dla standardowych gniazd blokujących
84 %package -n python3-%{module}
85 Summary: A coroutine-based Python 3 networking library
86 Summary(pl.UTF-8): Biblioteka sieciowa dla Pythona 3 oparta na korutynach
87 Group: Libraries/Python
88 %{?with_system_libev:Requires: libev >= 4.23}
89 Requires: python-greenlet >= 0.4.10
91 %description -n python3-%{module}
92 gevent is a coroutine-based Python networking library. Features
94 - Fast event loop based on libev.
95 - Lightweight execution units based on greenlet.
96 - Familiar API that re-uses concepts from the Python standard library.
97 - Cooperative sockets with SSL support.
98 - DNS queries performed through c-ares or a threadpool.
99 - Ability to use standard library and 3rd party modules written for
100 standard blocking sockets
102 %description -n python3-%{module} -l pl.UTF-8
103 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
105 - szybka pętla zdarzeń oparta na libev
106 - lekkie jednostki wykonywania oparte na bibliotece greenlet
107 - znajome API wykorzystujące koncepty biblioteki standardowej Pythona
108 - gniazda kooperatywne z obsługą SSL
109 - zapytania DNS wykonywane przez bibliotekę c-ares lub pulę wątków
110 - możliwość wykorzystania biblioteki standardowej lub modułów innych
111 producentów napisanych dla standardowych gniazd blokujących
114 %setup -q -n %{module}-%{version}
119 # when Cython-generated files are to be rebuilt
120 # (BR: python-Cython must be enabled then too)
121 # ln -s Makefile.ext Makefile
123 # must be exported to work (py*_build macro is not single invocation)
124 %{?with_system_libev:export LIBEV_EMBED=false}
125 %{?with_system_c_ares:export CARES_EMBED=false}
131 PKGDIR=$(echo $PWD/build-2/lib.*)
133 PYTHONPATH=$PKGDIR %{__python} testrunner.py --config known_failures.py
142 PKGDIR=$(echo $PWD/build-3/lib.*)
144 PYTHONPATH=$PKGDIR %{__python3} testrunner.py --config known_failures.py
150 rm -rf $RPM_BUILD_ROOT
152 %{?with_system_libev:export LIBEV_EMBED=false}
153 %{?with_system_c_ares:export CARES_EMBED=false}
159 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/*.{c,h,pyx}
160 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/libev/*.{c,h,pyx,ppyx}
166 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/*.{c,h,pyx}
167 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/libev/*.{c,h,pyx,ppyx}
171 rm -rf $RPM_BUILD_ROOT
175 %defattr(644,root,root,755)
176 %doc AUTHORS LICENSE NOTICE README.rst TODO
177 %dir %{py_sitedir}/gevent
178 %attr(755,root,root) %{py_sitedir}/gevent/_semaphore.so
179 %attr(755,root,root) %{py_sitedir}/gevent/ares.so
180 %{py_sitedir}/gevent/*.pxd
181 %{py_sitedir}/gevent/*.py[co]
182 %dir %{py_sitedir}/gevent/libev
183 %attr(755,root,root) %{py_sitedir}/gevent/libev/_corecffi.so
184 %attr(755,root,root) %{py_sitedir}/gevent/libev/corecext.so
185 %{py_sitedir}/gevent/libev/libev.pxd
186 %{py_sitedir}/gevent/libev/*.py[co]
187 %{py_sitedir}/gevent-%{version}-py%{py_ver}.egg-info
191 %files -n python3-%{module}
192 %defattr(644,root,root,755)
193 %doc AUTHORS LICENSE NOTICE README.rst TODO
194 %dir %{py3_sitedir}/gevent
195 %attr(755,root,root) %{py3_sitedir}/gevent/_semaphore.cpython-*.so
196 %attr(755,root,root) %{py3_sitedir}/gevent/ares.cpython-*.so
197 %{py3_sitedir}/gevent/__pycache__
198 %{py3_sitedir}/gevent/*.pxd
199 %{py3_sitedir}/gevent/*.py
200 %dir %{py3_sitedir}/gevent/libev
201 %attr(755,root,root) %{py3_sitedir}/gevent/libev/_corecffi.cpython-*.so
202 %attr(755,root,root) %{py3_sitedir}/gevent/libev/corecext.cpython-*.so
203 %{py3_sitedir}/gevent/libev/__pycache__
204 %{py3_sitedir}/gevent/libev/libev.pxd
205 %{py3_sitedir}/gevent/libev/*.py
206 %{py3_sitedir}/gevent-%{version}-py*.egg-info