]> git.pld-linux.org Git - packages/python-gevent.git/blame - python-gevent.spec
- rebuild with python 3.8
[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:
4f53d0c0
JB
10%bcond_without tests # do not run tests
11%bcond_with system_libev # build with system libev [test__core_stat.py test fails]
282f7bb0 12%bcond_without system_c_ares # build with system c_ares
4f53d0c0
JB
13%bcond_without python2 # CPython 2.x module
14%bcond_without python3 # CPython 3.x module
11497ff2 15
4f53d0c0
JB
16%define module gevent
17Summary: A coroutine-based Python 2 networking library
18Summary(pl.UTF-8): Biblioteka sieciowa dla Pythona 2 oparta na korutynach
78f066e6 19Name: python-%{module}
a412afa7 20Version: 1.3.7
356ee9bf 21Release: 2
4fc6ecf8 22Epoch: 1
78f066e6
ER
23License: MIT
24Group: Development/Languages
4f53d0c0 25#Source0Download: https://pypi.python.org/simple/gevent
b845a2a9 26Source0: https://files.pythonhosted.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
a412afa7 27# Source0-md5: 5d3f61ef4bb40fdbd5cbaac7f0d2e585
2fed4eba 28Patch0: known_failures-pld.patch
4f53d0c0 29Patch1: %{name}-tests.patch
2fed4eba 30URL: http://www.gevent.org/
140cee97 31%{?with_system_c_ares:BuildRequires: c-ares-devel >= 1.10.0}
4f53d0c0 32%{?with_system_libev:BuildRequires: libev-devel >= 4.23}
a412afa7 33BuildRequires: python-Cython >= 0.28.5
06c1ffe6 34%if %{with python2}
4f53d0c0
JB
35BuildRequires: python-cffi >= 1.3.0
36BuildRequires: python-devel >= 1:2.7
a412afa7 37BuildRequires: python-greenlet-devel >= 0.4.15
7c3f7ce6 38%if %{with tests}
4f53d0c0
JB
39BuildRequires: python-coverage >= 4.0
40BuildRequires: python-devel-src >= 1:2.7
a412afa7 41BuildRequires: python-greenlet >= 0.4.15
cf0d448b 42BuildRequires: python-objgraph
4f53d0c0 43BuildRequires: python-setuptools
73d3206b 44BuildRequires: python-test
06c1ffe6
AM
45%endif
46%endif
47%if %{with python3}
4f53d0c0
JB
48BuildRequires: python3-cffi >= 1.3.0
49BuildRequires: python3-devel >= 1:3.3
a412afa7 50BuildRequires: python3-greenlet-devel >= 0.4.15
06c1ffe6 51%if %{with tests}
4f53d0c0
JB
52BuildRequires: python3-coverage >= 4.0
53BuildRequires: python3-greenlet >= 0.4.10
cf0d448b 54BuildRequires: python3-objgraph
4f53d0c0 55BuildRequires: python3-setuptools
06c1ffe6
AM
56BuildRequires: python3-test
57%endif
7c3f7ce6 58%endif
78f066e6 59BuildRequires: rpm-pythonprov
4f53d0c0
JB
60BuildRequires: rpmbuild(macros) >= 1.714
61%{?with_system_libev:Requires: libev >= 4.23}
a412afa7 62Requires: python-greenlet >= 0.4.15
78f066e6 63BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71c03694
ER
64
65%description
4f53d0c0
JB
66gevent is a coroutine-based Python networking library. Features
67include:
06c1ffe6
AM
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
4f53d0c0
JB
74 standard blocking sockets.
75
76%description -l pl.UTF-8
77gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
78możliwości to m.in.
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
06c1ffe6
AM
86
87%package -n python3-%{module}
4f53d0c0
JB
88Summary: A coroutine-based Python 3 networking library
89Summary(pl.UTF-8): Biblioteka sieciowa dla Pythona 3 oparta na korutynach
06c1ffe6 90Group: Libraries/Python
4f53d0c0 91%{?with_system_libev:Requires: libev >= 4.23}
a412afa7 92Requires: python-greenlet >= 0.4.15
06c1ffe6
AM
93
94%description -n python3-%{module}
4f53d0c0
JB
95gevent is a coroutine-based Python networking library. Features
96include:
282f7bb0
JK
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
6c017ba8 103 standard blocking sockets
71c03694 104
4f53d0c0
JB
105%description -n python3-%{module} -l pl.UTF-8
106gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
107możliwości to m.in.
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
115
71c03694
ER
116%prep
117%setup -q -n %{module}-%{version}
2fed4eba 118%patch0 -p1
4f53d0c0 119%patch1 -p1 -b .orig
11497ff2 120
71c03694 121%build
a412afa7
JK
122
123# force rebuild of Cython-generated files
124# they depend on specific deps (e.g. greenlet) versions
125rm src/gevent/{*.c,resolver/cares.c}
282f7bb0 126
4f53d0c0
JB
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}
130
06c1ffe6 131%if %{with python2}
37c131a9 132%py_build
71c03694 133
31e6d75d 134%if %{with tests}
4f53d0c0
JB
135PKGDIR=$(echo $PWD/build-2/lib.*)
136cd src/greentest
137PYTHONPATH=$PKGDIR %{__python} testrunner.py --config known_failures.py
138cd ../..
31e6d75d 139%endif
06c1ffe6
AM
140%endif
141
142%if %{with python3}
37c131a9 143%py3_build
06c1ffe6
AM
144
145%if %{with tests}
4f53d0c0
JB
146PKGDIR=$(echo $PWD/build-3/lib.*)
147cd src/greentest
148PYTHONPATH=$PKGDIR %{__python3} testrunner.py --config known_failures.py
149cd ../..
06c1ffe6
AM
150%endif
151%endif
31e6d75d 152
71c03694
ER
153%install
154rm -rf $RPM_BUILD_ROOT
282f7bb0 155
4f53d0c0
JB
156%{?with_system_libev:export LIBEV_EMBED=false}
157%{?with_system_c_ares:export CARES_EMBED=false}
158
06c1ffe6 159%if %{with python2}
37c131a9 160%py_install
71c03694
ER
161
162%py_postclean
cf0d448b
AM
163%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/*.c
164%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/*/*.{c,h,pyx}
06c1ffe6
AM
165%endif
166
167%if %{with python3}
37c131a9 168%py3_install
4f53d0c0 169
cf0d448b
AM
170%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/*.c
171%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/*/*.{c,h,pyx}
06c1ffe6 172%endif
71c03694
ER
173
174%clean
175rm -rf $RPM_BUILD_ROOT
176
06c1ffe6 177%if %{with python2}
71c03694
ER
178%files
179%defattr(644,root,root,755)
4f53d0c0
JB
180%doc AUTHORS LICENSE NOTICE README.rst TODO
181%dir %{py_sitedir}/gevent
cf0d448b 182%attr(755,root,root) %{py_sitedir}/gevent/*.so
4f53d0c0
JB
183%{py_sitedir}/gevent/*.pxd
184%{py_sitedir}/gevent/*.py[co]
cf0d448b
AM
185%dir %{py_sitedir}/gevent/_ffi
186%{py_sitedir}/gevent/_ffi/*.py[co]
4f53d0c0
JB
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]
cf0d448b
AM
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
4f53d0c0 199%{py_sitedir}/gevent-%{version}-py%{py_ver}.egg-info
06c1ffe6
AM
200%endif
201
202%if %{with python3}
203%files -n python3-%{module}
204%defattr(644,root,root,755)
4f53d0c0
JB
205%doc AUTHORS LICENSE NOTICE README.rst TODO
206%dir %{py3_sitedir}/gevent
cf0d448b 207%attr(755,root,root) %{py3_sitedir}/gevent/*.cpython-*.so
4f53d0c0
JB
208%{py3_sitedir}/gevent/__pycache__
209%{py3_sitedir}/gevent/*.pxd
210%{py3_sitedir}/gevent/*.py
cf0d448b
AM
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
4f53d0c0 218%dir %{py3_sitedir}/gevent/libev
25ec3431 219%attr(755,root,root) %{py3_sitedir}/gevent/libev/_corecffi.abi3.so
e2766a93 220%attr(755,root,root) %{py3_sitedir}/gevent/libev/corecext.cpython-*.so
4f53d0c0
JB
221%{py3_sitedir}/gevent/libev/__pycache__
222%{py3_sitedir}/gevent/libev/libev.pxd
223%{py3_sitedir}/gevent/libev/*.py
cf0d448b
AM
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
4f53d0c0 229%{py3_sitedir}/gevent-%{version}-py*.egg-info
06c1ffe6 230%endif
This page took 0.160888 seconds and 4 git commands to generate.