]> git.pld-linux.org Git - packages/python-gevent.git/blob - python-gevent.spec
- rebuild with python 3.8
[packages/python-gevent.git] / python-gevent.spec
1
2 # TODO:
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
7 #         (now excluded via known_failures-pld.patch)
8
9 # Conditional build:
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
15
16 %define module  gevent
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}
20 Version:        1.3.7
21 Release:        2
22 Epoch:          1
23 License:        MIT
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
34 %if %{with python2}
35 BuildRequires:  python-cffi >= 1.3.0
36 BuildRequires:  python-devel >= 1:2.7
37 BuildRequires:  python-greenlet-devel >= 0.4.15
38 %if %{with tests}
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
45 %endif
46 %endif
47 %if %{with python3}
48 BuildRequires:  python3-cffi >= 1.3.0
49 BuildRequires:  python3-devel >= 1:3.3
50 BuildRequires:  python3-greenlet-devel >= 0.4.15
51 %if %{with tests}
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
57 %endif
58 %endif
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)
64
65 %description
66 gevent is a coroutine-based Python networking library. Features
67 include:
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.
75
76 %description -l pl.UTF-8
77 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
78 moż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
86
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
93
94 %description -n python3-%{module}
95 gevent is a coroutine-based Python networking library. Features
96 include:
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
104
105 %description -n python3-%{module} -l pl.UTF-8
106 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
107 moż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
116 %prep
117 %setup -q -n %{module}-%{version}
118 %patch0 -p1
119 %patch1 -p1 -b .orig
120
121 %build
122
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}
126
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
131 %if %{with python2}
132 %py_build
133
134 %if %{with tests}
135 PKGDIR=$(echo $PWD/build-2/lib.*)
136 cd src/greentest
137 PYTHONPATH=$PKGDIR %{__python} testrunner.py --config known_failures.py
138 cd ../..
139 %endif
140 %endif
141
142 %if %{with python3}
143 %py3_build
144
145 %if %{with tests}
146 PKGDIR=$(echo $PWD/build-3/lib.*)
147 cd src/greentest
148 PYTHONPATH=$PKGDIR %{__python3} testrunner.py --config known_failures.py
149 cd ../..
150 %endif
151 %endif
152
153 %install
154 rm -rf $RPM_BUILD_ROOT
155
156 %{?with_system_libev:export LIBEV_EMBED=false}
157 %{?with_system_c_ares:export CARES_EMBED=false}
158
159 %if %{with python2}
160 %py_install
161
162 %py_postclean
163 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/*.c
164 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/*/*.{c,h,pyx}
165 %endif
166
167 %if %{with python3}
168 %py3_install
169
170 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/*.c
171 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gevent/*/*.{c,h,pyx}
172 %endif
173
174 %clean
175 rm -rf $RPM_BUILD_ROOT
176
177 %if %{with python2}
178 %files
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
200 %endif
201
202 %if %{with python3}
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
230 %endif
This page took 0.119189 seconds and 3 git commands to generate.