]> git.pld-linux.org Git - packages/python-gevent.git/blob - python-gevent.spec
- fix files more
[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.2.1
21 Release:        3
22 Epoch:          1
23 License:        MIT
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
35 %if %{with python2}
36 BuildRequires:  python-cffi >= 1.3.0
37 BuildRequires:  python-devel >= 1:2.7
38 %if %{with tests}
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
44 %endif
45 %endif
46 %if %{with python3}
47 BuildRequires:  python3-cffi >= 1.3.0
48 BuildRequires:  python3-devel >= 1:3.3
49 %if %{with tests}
50 BuildRequires:  python3-coverage >= 4.0
51 BuildRequires:  python3-greenlet >= 0.4.10
52 BuildRequires:  python3-setuptools
53 BuildRequires:  python3-test
54 %endif
55 %endif
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)
61
62 %description
63 gevent is a coroutine-based Python networking library. Features
64 include:
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.
72
73 %description -l pl.UTF-8
74 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
75 moż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
83
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
90
91 %description -n python3-%{module}
92 gevent is a coroutine-based Python networking library. Features
93 include:
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
101
102 %description -n python3-%{module} -l pl.UTF-8
103 gevent to biblioteka sieciowa dla Pythona oparta na korutynach. Jej
104 moż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
113 %prep
114 %setup -q -n %{module}-%{version}
115 %patch0 -p1
116 %patch1 -p1 -b .orig
117
118 %build
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
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
127 %if %{with python2}
128 %py_build
129
130 %if %{with tests}
131 PKGDIR=$(echo $PWD/build-2/lib.*)
132 cd src/greentest
133 PYTHONPATH=$PKGDIR %{__python} testrunner.py --config known_failures.py
134 cd ../..
135 %endif
136 %endif
137
138 %if %{with python3}
139 %py3_build
140
141 %if %{with tests}
142 PKGDIR=$(echo $PWD/build-3/lib.*)
143 cd src/greentest
144 PYTHONPATH=$PKGDIR %{__python3} testrunner.py --config known_failures.py
145 cd ../..
146 %endif
147 %endif
148
149 %install
150 rm -rf $RPM_BUILD_ROOT
151
152 %{?with_system_libev:export LIBEV_EMBED=false}
153 %{?with_system_c_ares:export CARES_EMBED=false}
154
155 %if %{with python2}
156 %py_install
157
158 %py_postclean
159 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/*.{c,h,pyx}
160 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gevent/libev/*.{c,h,pyx,ppyx}
161 %endif
162
163 %if %{with python3}
164 %py3_install
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}
168 %endif
169
170 %clean
171 rm -rf $RPM_BUILD_ROOT
172
173 %if %{with python2}
174 %files
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
188 %endif
189
190 %if %{with python3}
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.abi3.so
202 %attr(755,root,root) %{py3_sitedir}/gevent/libev/corecext.cpython-36m-*.so
203
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
208 %endif
This page took 0.09823 seconds and 3 git commands to generate.