]> git.pld-linux.org Git - packages/python-gevent.git/blame - python-gevent.spec
- fix files more
[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}
4f53d0c0 20Version: 1.2.1
3b06763b 21Release: 3
4fc6ecf8 22Epoch: 1
78f066e6
ER
23License: MIT
24Group: Development/Languages
4f53d0c0
JB
25#Source0Download: https://pypi.python.org/simple/gevent
26Source0: http://files.pythonhosted.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
27# Source0-md5: 6700a2433c8e0635425e6798760efc81
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
JB
32%{?with_system_libev:BuildRequires: libev-devel >= 4.23}
33# if cpython generated files need rebuild
34#BuildRequires: python-Cython >= 0.25.1
06c1ffe6 35%if %{with python2}
4f53d0c0
JB
36BuildRequires: python-cffi >= 1.3.0
37BuildRequires: python-devel >= 1:2.7
7c3f7ce6 38%if %{with tests}
4f53d0c0
JB
39BuildRequires: python-coverage >= 4.0
40BuildRequires: python-devel-src >= 1:2.7
41BuildRequires: python-greenlet >= 0.4.10
42BuildRequires: python-setuptools
73d3206b 43BuildRequires: python-test
06c1ffe6
AM
44%endif
45%endif
46%if %{with python3}
4f53d0c0
JB
47BuildRequires: python3-cffi >= 1.3.0
48BuildRequires: python3-devel >= 1:3.3
06c1ffe6 49%if %{with tests}
4f53d0c0
JB
50BuildRequires: python3-coverage >= 4.0
51BuildRequires: python3-greenlet >= 0.4.10
52BuildRequires: python3-setuptools
06c1ffe6
AM
53BuildRequires: python3-test
54%endif
7c3f7ce6 55%endif
78f066e6 56BuildRequires: rpm-pythonprov
4f53d0c0
JB
57BuildRequires: rpmbuild(macros) >= 1.714
58%{?with_system_libev:Requires: libev >= 4.23}
59Requires: python-greenlet >= 0.4.10
78f066e6 60BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71c03694
ER
61
62%description
4f53d0c0
JB
63gevent is a coroutine-based Python networking library. Features
64include:
06c1ffe6
AM
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
4f53d0c0
JB
71 standard blocking sockets.
72
73%description -l pl.UTF-8
74gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
75możliwości to m.in.
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
06c1ffe6
AM
83
84%package -n python3-%{module}
4f53d0c0
JB
85Summary: A coroutine-based Python 3 networking library
86Summary(pl.UTF-8): Biblioteka sieciowa dla Pythona 3 oparta na korutynach
06c1ffe6 87Group: Libraries/Python
4f53d0c0
JB
88%{?with_system_libev:Requires: libev >= 4.23}
89Requires: python-greenlet >= 0.4.10
06c1ffe6
AM
90
91%description -n python3-%{module}
4f53d0c0
JB
92gevent is a coroutine-based Python networking library. Features
93include:
282f7bb0
JK
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
6c017ba8 100 standard blocking sockets
71c03694 101
4f53d0c0
JB
102%description -n python3-%{module} -l pl.UTF-8
103gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
104możliwości to m.in.
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
112
71c03694
ER
113%prep
114%setup -q -n %{module}-%{version}
2fed4eba 115%patch0 -p1
4f53d0c0 116%patch1 -p1 -b .orig
11497ff2 117
71c03694 118%build
282f7bb0
JK
119# when Cython-generated files are to be rebuilt
120# (BR: python-Cython must be enabled then too)
121# ln -s Makefile.ext Makefile
122
4f53d0c0
JB
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}
126
06c1ffe6 127%if %{with python2}
37c131a9 128%py_build
71c03694 129
31e6d75d 130%if %{with tests}
4f53d0c0
JB
131PKGDIR=$(echo $PWD/build-2/lib.*)
132cd src/greentest
133PYTHONPATH=$PKGDIR %{__python} testrunner.py --config known_failures.py
134cd ../..
31e6d75d 135%endif
06c1ffe6
AM
136%endif
137
138%if %{with python3}
37c131a9 139%py3_build
06c1ffe6
AM
140
141%if %{with tests}
4f53d0c0
JB
142PKGDIR=$(echo $PWD/build-3/lib.*)
143cd src/greentest
144PYTHONPATH=$PKGDIR %{__python3} testrunner.py --config known_failures.py
145cd ../..
06c1ffe6
AM
146%endif
147%endif
31e6d75d 148
71c03694
ER
149%install
150rm -rf $RPM_BUILD_ROOT
282f7bb0 151
4f53d0c0
JB
152%{?with_system_libev:export LIBEV_EMBED=false}
153%{?with_system_c_ares:export CARES_EMBED=false}
154
06c1ffe6 155%if %{with python2}
37c131a9 156%py_install
71c03694
ER
157
158%py_postclean
4f53d0c0
JB
159%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/*.{c,h,pyx}
160%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/libev/*.{c,h,pyx,ppyx}
06c1ffe6
AM
161%endif
162
163%if %{with python3}
37c131a9 164%py3_install
4f53d0c0
JB
165
166%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/*.{c,h,pyx}
167%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/libev/*.{c,h,pyx,ppyx}
06c1ffe6 168%endif
71c03694
ER
169
170%clean
171rm -rf $RPM_BUILD_ROOT
172
06c1ffe6 173%if %{with python2}
71c03694
ER
174%files
175%defattr(644,root,root,755)
4f53d0c0
JB
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
06c1ffe6
AM
188%endif
189
190%if %{with python3}
191%files -n python3-%{module}
192%defattr(644,root,root,755)
4f53d0c0
JB
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
25ec3431 201%attr(755,root,root) %{py3_sitedir}/gevent/libev/_corecffi.abi3.so
3b06763b
JR
202%attr(755,root,root) %{py3_sitedir}/gevent/libev/corecext.cpython-36m-*.so
203
4f53d0c0
JB
204%{py3_sitedir}/gevent/libev/__pycache__
205%{py3_sitedir}/gevent/libev/libev.pxd
206%{py3_sitedir}/gevent/libev/*.py
207%{py3_sitedir}/gevent-%{version}-py*.egg-info
06c1ffe6 208%endif
This page took 0.189603 seconds and 4 git commands to generate.