]> git.pld-linux.org Git - packages/python-gevent.git/blame - python-gevent.spec
- updated to 21.12.0
[packages/python-gevent.git] / python-gevent.spec
CommitLineData
11497ff2
JK
1
2# TODO:
19395fb4
JK
3# - test__core_stat.py fails on 32-bit builds with system libev
4# investigate/fix that and enable system libev
5#
6# - investigate some other failing tests
5a77c3db 7# (now excluded via known_failures-pld.patch)
11497ff2
JK
8
9# Conditional build:
5a03dc88 10%bcond_without doc # Sphinx documentation
b1006359 11%bcond_with tests # testing
5a03dc88
JB
12%bcond_with system_libev # system libev [test__core_stat.py test fails]
13%bcond_without system_c_ares # system c_ares
4f53d0c0
JB
14%bcond_without python2 # CPython 2.x module
15%bcond_without python3 # CPython 3.x module
11497ff2 16
4f53d0c0
JB
17%define module gevent
18Summary: A coroutine-based Python 2 networking library
19Summary(pl.UTF-8): Biblioteka sieciowa dla Pythona 2 oparta na korutynach
78f066e6 20Name: python-%{module}
123c5be2 21Version: 21.12.0
b1006359 22Release: 1
4fc6ecf8 23Epoch: 1
78f066e6 24License: MIT
123c5be2 25Group: Libraries/Python
5a03dc88 26#Source0Download: https://pypi.org/simple/gevent/
b845a2a9 27Source0: https://files.pythonhosted.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
123c5be2
JB
28# Source0-md5: 84014946a25407706cbe9ecb088f1e9c
29Patch0: %{name}-sphinx-python3.patch
30Patch1: known_failures-pld.patch
2fed4eba 31URL: http://www.gevent.org/
140cee97 32%{?with_system_c_ares:BuildRequires: c-ares-devel >= 1.10.0}
4f53d0c0 33%{?with_system_libev:BuildRequires: libev-devel >= 4.23}
06c1ffe6 34%if %{with python2}
5a03dc88 35BuildRequires: python-Cython >= 0.29
123c5be2 36BuildRequires: python-cffi >= 1.12.2
4f53d0c0 37BuildRequires: python-devel >= 1:2.7
123c5be2
JB
38BuildRequires: python-greenlet-devel >= 1.1.0
39BuildRequires: python-greenlet-devel < 2
40BuildRequires: python-setuptools >= 1:24.2.0
7c3f7ce6 41%if %{with tests}
4f53d0c0
JB
42BuildRequires: python-coverage >= 4.0
43BuildRequires: python-devel-src >= 1:2.7
123c5be2
JB
44BuildRequires: python-dns >= 1.16.0
45BuildRequires: python-dns < 2
5a03dc88 46BuildRequires: python-futures
123c5be2
JB
47BuildRequires: python-greenlet >= 1.1.0
48BuildRequires: python-greenlet < 2
49BuildRequires: python-idna
5a03dc88 50BuildRequires: python-mock
cf0d448b 51BuildRequires: python-objgraph
123c5be2 52BuildRequires: python-psutil >= 5.7.0
5a03dc88 53BuildRequires: python-requests
73d3206b 54BuildRequires: python-test
5a03dc88
JB
55BuildRequires: python-zope.event
56BuildRequires: python-zope.interface
06c1ffe6
AM
57%endif
58%endif
59%if %{with python3}
5a03dc88 60BuildRequires: python3-Cython >= 0.29
123c5be2
JB
61BuildRequires: python3-cffi >= 1.12.2
62BuildRequires: python3-devel >= 1:3.6
63BuildRequires: python3-greenlet-devel >= 1.1.0
64BuildRequires: python3-greenlet-devel < 2
65BuildRequires: python3-setuptools >= 1:24.2.0
06c1ffe6 66%if %{with tests}
4f53d0c0 67BuildRequires: python3-coverage >= 4.0
123c5be2
JB
68BuildRequires: python3-dns >= 1.16.0
69#BuildRequires: python3-dns < 2
70BuildRequires: python3-greenlet >= 1.1.0
71BuildRequires: python3-greenlet < 2
72BuildRequires: python3-idna
cf0d448b 73BuildRequires: python3-objgraph
123c5be2 74BuildRequires: python3-psutil >= 5.7.0
5a03dc88 75BuildRequires: python3-requests
06c1ffe6 76BuildRequires: python3-test
5a03dc88
JB
77BuildRequires: python3-zope.event
78BuildRequires: python3-zope.interface
06c1ffe6 79%endif
7c3f7ce6 80%endif
78f066e6 81BuildRequires: rpm-pythonprov
4f53d0c0 82BuildRequires: rpmbuild(macros) >= 1.714
5a03dc88
JB
83%if %{with doc}
84BuildRequires: python3-repoze.sphinx.autointerface
b1006359 85BuildRequires: python3-sphinxcontrib-programoutput
79a906e7 86BuildRequires: sphinx-pdg-3
5a03dc88 87%endif
4f53d0c0 88%{?with_system_libev:Requires: libev >= 4.23}
123c5be2 89Requires: python-greenlet >= 1.1.0
78f066e6 90BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71c03694
ER
91
92%description
4f53d0c0
JB
93gevent is a coroutine-based Python networking library. Features
94include:
06c1ffe6
AM
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
4f53d0c0
JB
101 standard blocking sockets.
102
103%description -l pl.UTF-8
104gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
105możliwości to m.in.
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
06c1ffe6
AM
113
114%package -n python3-%{module}
4f53d0c0
JB
115Summary: A coroutine-based Python 3 networking library
116Summary(pl.UTF-8): Biblioteka sieciowa dla Pythona 3 oparta na korutynach
06c1ffe6 117Group: Libraries/Python
4f53d0c0 118%{?with_system_libev:Requires: libev >= 4.23}
123c5be2 119Requires: python-greenlet >= 1.1.0
06c1ffe6
AM
120
121%description -n python3-%{module}
4f53d0c0
JB
122gevent is a coroutine-based Python networking library. Features
123include:
282f7bb0
JK
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
6c017ba8 130 standard blocking sockets
71c03694 131
4f53d0c0
JB
132%description -n python3-%{module} -l pl.UTF-8
133gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
134możliwości to m.in.
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
142
5a03dc88
JB
143%package apidocs
144Summary: API documentation for Python gevent module
145Summary(pl.UTF-8): Dokumentacja API modułu Pythona gevent
146Group: Documentation
147
148%description apidocs
149API documentation for Python gevent module.
150
151%description apidocs -l pl.UTF-8
152Dokumentacja API modułu Pythona gevent.
153
71c03694
ER
154%prep
155%setup -q -n %{module}-%{version}
123c5be2
JB
156%patch0 -p1
157#%patch1 -p1
11497ff2 158
5a03dc88 159find . -type f -name '*.orig' | xargs -r %{__rm}
a412afa7
JK
160
161# force rebuild of Cython-generated files
162# they depend on specific deps (e.g. greenlet) versions
5a03dc88 163%{__rm} src/gevent/{*.c,resolver/cares.c}
282f7bb0 164
5a03dc88 165%build
4f53d0c0
JB
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}
169
06c1ffe6 170%if %{with python2}
37c131a9 171%py_build
71c03694 172
31e6d75d 173%if %{with tests}
5a03dc88
JB
174PYTHONPATH=$(echo $PWD/build-2/lib.*) \
175%{__python} -m gevent.tests
31e6d75d 176%endif
06c1ffe6
AM
177%endif
178
179%if %{with python3}
37c131a9 180%py3_build
06c1ffe6
AM
181
182%if %{with tests}
5a03dc88
JB
183PYTHONPATH=$(echo $PWD/build-3/lib.*) \
184%{__python3} -m gevent.tests
06c1ffe6
AM
185%endif
186%endif
31e6d75d 187
5a03dc88 188%if %{with doc}
79a906e7 189PYTHONPATH=$(echo $PWD/build-3/lib.*) \
b1006359 190%{__make} -C docs html \
79a906e7 191 SPHINXBUILD=sphinx-build-3
5a03dc88
JB
192%endif
193
71c03694
ER
194%install
195rm -rf $RPM_BUILD_ROOT
282f7bb0 196
4f53d0c0
JB
197%{?with_system_libev:export LIBEV_EMBED=false}
198%{?with_system_c_ares:export CARES_EMBED=false}
199
06c1ffe6 200%if %{with python2}
37c131a9 201%py_install
71c03694
ER
202
203%py_postclean
5a03dc88 204%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/gevent/{testing,tests}
06c1ffe6
AM
205%endif
206
207%if %{with python3}
37c131a9 208%py3_install
4f53d0c0 209
5a03dc88 210%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/gevent/{testing,tests}
06c1ffe6 211%endif
71c03694
ER
212
213%clean
214rm -rf $RPM_BUILD_ROOT
215
06c1ffe6 216%if %{with python2}
71c03694
ER
217%files
218%defattr(644,root,root,755)
5a03dc88 219%doc AUTHORS CHANGES.rst LICENSE NOTICE README.rst TODO
4f53d0c0 220%dir %{py_sitedir}/gevent
cf0d448b 221%attr(755,root,root) %{py_sitedir}/gevent/*.so
4f53d0c0 222%{py_sitedir}/gevent/*.py[co]
cf0d448b
AM
223%dir %{py_sitedir}/gevent/_ffi
224%{py_sitedir}/gevent/_ffi/*.py[co]
4f53d0c0
JB
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
4f53d0c0 228%{py_sitedir}/gevent/libev/*.py[co]
cf0d448b
AM
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
cf0d448b
AM
233%{py_sitedir}/gevent/resolver/*.py[co]
234%attr(755,root,root) %{py_sitedir}/gevent/resolver/cares.so
4f53d0c0 235%{py_sitedir}/gevent-%{version}-py%{py_ver}.egg-info
06c1ffe6
AM
236%endif
237
238%if %{with python3}
239%files -n python3-%{module}
240%defattr(644,root,root,755)
5a03dc88 241%doc AUTHORS CHANGES.rst LICENSE NOTICE README.rst TODO
4f53d0c0 242%dir %{py3_sitedir}/gevent
cf0d448b 243%attr(755,root,root) %{py3_sitedir}/gevent/*.cpython-*.so
4f53d0c0 244%{py3_sitedir}/gevent/__pycache__
4f53d0c0 245%{py3_sitedir}/gevent/*.py
cf0d448b
AM
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
4f53d0c0 253%dir %{py3_sitedir}/gevent/libev
25ec3431 254%attr(755,root,root) %{py3_sitedir}/gevent/libev/_corecffi.abi3.so
e2766a93 255%attr(755,root,root) %{py3_sitedir}/gevent/libev/corecext.cpython-*.so
4f53d0c0 256%{py3_sitedir}/gevent/libev/__pycache__
4f53d0c0 257%{py3_sitedir}/gevent/libev/*.py
cf0d448b
AM
258%dir %{py3_sitedir}/gevent/resolver
259%{py3_sitedir}/gevent/resolver/__pycache__
260%{py3_sitedir}/gevent/resolver/*.py
cf0d448b 261%attr(755,root,root) %{py3_sitedir}/gevent/resolver/cares.*.so
4f53d0c0 262%{py3_sitedir}/gevent-%{version}-py*.egg-info
06c1ffe6 263%endif
5a03dc88
JB
264
265%if %{with doc}
266%files apidocs
267%defattr(644,root,root,755)
123c5be2 268%doc docs/_build/html/{_modules,_static,api,development,examples,*.html,*.js}
5a03dc88 269%endif
This page took 0.25487 seconds and 4 git commands to generate.