-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-eventlet.spec
308 lines (232 loc) · 10.2 KB
/
python-eventlet.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
%{?scl:%scl_package python-eventlet}
%{!?scl:%global pkg_name %{name}}
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?_licensedir:%global license %%doc}
%global pypi_name eventlet
%if 0%{?fedora}
%global with_python3 1
%endif
Name: %{?scl_prefix}python-%{pypi_name}
Version: 0.21.0
Release: 3%{?dist}
Summary: Highly concurrent networking library
License: MIT
URL: http://eventlet.net
Source0: https://pypi.io/packages/source/e/eventlet/eventlet-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-greenlet
Requires: python-greenlet
%{?scl:Requires: %scl_runtime}
%{?scl:BuildRequires: %scl-scldevel}
%description
Eventlet is a networking library written in Python. It achieves high
scalability by using non-blocking io while at the same time retaining
high programmer usability by using coroutines to make the non-blocking
io operations appear blocking at the source code level.
%package -n %{?scl_prefix}python2-%{pypi_name}
Summary: Highly concurrent networking library
BuildRequires: python2-devel
BuildRequires: python2-nose
BuildRequires: python-setuptools
Requires: python-greenlet
Requires: python-enum34
%{!?scl:%{?python_provide:%python_provide python2-%{pypi_name}}}
# python_provide does not exist in CBS Cloud buildroot
Provides: %{?scl_prefix}python-%{pypi_name} = %{version}-%{release}
Obsoletes: %{?scl_prefix}python-%{pypi_name} < 0.17.4-3
%description -n %{?scl_prefix}python2-%{pypi_name}
Eventlet is a networking library written in Python. It achieves high
scalability by using non-blocking io while at the same time retaining
high programmer usability by using coroutines to make the non-blocking
io operations appear blocking at the source code level.
%if 0%{?with_python3}
%package -n %{?scl_prefix}python3-eventlet
Summary: Highly concurrent networking library
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-nose
BuildRequires: python3-setuptools
BuildRequires: python3-greenlet
Requires: python3-greenlet
%{!?scl:%{?python_provide:%python_provide python3-eventlet}}
%description -n %{?scl_prefix}python3-eventlet
Eventlet is a networking library written in Python. It achieves high
scalability by using non-blocking io while at the same time retaining
high programmer usability by using coroutines to make the non-blocking
io operations appear blocking at the source code level.
%endif
%package -n %{?scl_prefix}python2-%{pypi_name}-doc
Summary: Documentation for %{name}
BuildRequires: python-sphinx
BuildRequires: %{?scl_prefix}python2-zmq
%{!?scl:%{?python_provide:%python_provide python2-%{pypi_name}-doc}}
# python_provide does not exist in CBS Cloud buildroot
Provides: %{?scl_prefix}python-%{pypi_name}-doc = %{version}-%{release}
Obsoletes: %{?scl_prefix}python-%{pypi_name}-doc < 0.17.4-3
%description -n %{?scl_prefix}python2-%{pypi_name}-doc
Documentation for the python-eventlet package.
%if 0%{?with_python3}
%package -n %{?scl_prefix}python3-eventlet-doc
Summary: Documentation for python3-eventlet-doc
BuildRequires: python3-sphinx
BuildRequires: %{?scl_prefix}python3-zmq
%description -n %{?scl_prefix}python3-eventlet-doc
Documentation for the python-eventlet package.
%endif
%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf *.egg-info
# Remove dependency on enum-compat from setup.py. enum-compat is installed
# as Require for python2 subpackage and it is not needed for Python 3
sed -i "/'enum-compat',/d" setup.py
# generate html docs
export PYTHONPATH="$( pwd ):$PYTHONPATH"
pushd doc
make html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
popd
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
# generate html docs
export PYTHONPATH="$( pwd ):$PYTHONPATH"
pushd doc
make html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
popd
%endif
%build
%{?scl:scl enable %{scl} - << "EOF"}
%{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%{?scl:EOF}
%check
# Tests are written only for Python 3
%if 0%{?with_python3}
nosetests-%{python3_version}
%endif
%install
%{?scl:scl enable %{scl} - << "EOF"}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot} --prefix %{?_prefix}
rm -rf %{buildroot}/%{python3_sitelib}/tests
popd
%endif
%{__python2} setup.py install --skip-build --root %{buildroot} --prefix %{?_prefix}
rm -rf %{buildroot}/%{python2_sitelib}/tests
# FIXME: Those files are not meant to be used with Python 2.7
# Anyway the whole module eventlet.green.http is Python 3 only
# Trying to import it will fail under Python 2.7
# https://github.com/eventlet/eventlet/issues/369
rm -rf %{buildroot}/%{python2_sitelib}/%{pypi_name}/green/http/{cookiejar,client}.py
%{?scl:EOF}
%files -n %{?scl_prefix}python2-%{pypi_name}
%doc README.rst AUTHORS LICENSE NEWS
%license LICENSE
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%if 0%{?with_python3}
%files -n %{?scl_prefix}python3-%{pypi_name}
%doc README.rst AUTHORS LICENSE NEWS
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif
%files -n %{?scl_prefix}python2-%{pypi_name}-doc
%license LICENSE
%doc doc/_build/html
%if 0%{?with_python3}
%files -n %{?scl_prefix}python3-%{pypi_name}-doc
%license LICENSE
%doc doc/_build/html
%endif
%changelog
* Wed Oct 04 2017 Augusto Mecking Caringi <[email protected]> - 0.21.0-3
- scl conversion
* Thu Jul 27 2017 Fedora Release Engineering <[email protected]> - 0.21.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue May 23 2017 Lumír Balhar <[email protected]> - 0.21.0-1
- Upstream 0.21.0
- Fix issue with enum-compat dependency for dependent packages
- Enable tests
- Fix tracebacks during docs generating by install python[23]-zmq
* Tue Apr 25 2017 Haïkel Guémar <[email protected]> - 0.20.1-1
- Upstream 0.20.1
* Sat Feb 11 2017 Fedora Release Engineering <[email protected]> - 0.18.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <[email protected]> - 0.18.4-3
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <[email protected]> - 0.18.4-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Mon Apr 25 2016 Kevin Fenzi <[email protected]> - 0.18.4-1
- Update to 0.18.4. Fixes bug #1329993
* Thu Feb 04 2016 Fedora Release Engineering <[email protected]> - 0.17.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <[email protected]> - 0.17.4-5
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Mon Oct 19 2015 Jon Schlueter <[email protected]> 0.17.4-4
- greenio: send() was running empty loop on ENOTCONN rhbz#1268351
* Thu Sep 03 2015 Pádraig Brady <[email protected]> - 0.17.4-3
- Tighten up Provides: and Obsoletes: for previous change
* Tue Sep 01 2015 Chandan Kumar <[email protected]> - 0.17.4-2
- Added python3 support
* Wed Jul 22 2015 Pádraig Brady <[email protected]> - 0.17.4-1
- Latest upstream
* Thu Jun 18 2015 Fedora Release Engineering <[email protected]> - 0.17.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Apr 14 2015 Pádraig Brady <[email protected]> - 0.17.3-1
- Latest upstream
* Tue Mar 31 2015 Pádraig Brady <[email protected]> - 0.17.1-1
- Latest upstream
* Tue Sep 02 2014 Pádraig Brady <[email protected]> - 0.15.2-1
- Latest upstream
* Sat Jun 07 2014 Fedora Release Engineering <[email protected]> - 0.14.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon Oct 28 2013 Alan Pevec <[email protected]> - 0.14.0-1
- Update to 0.14.0
* Sun Aug 04 2013 Fedora Release Engineering <[email protected]> - 0.12.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Feb 20 2013 Pádraig Brady <[email protected] - 0.12.0-1
- Update to 0.12.0
* Thu Feb 14 2013 Fedora Release Engineering <[email protected]> - 0.9.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Mon Nov 12 2012 Pádraig Brady <[email protected] - 0.9.17-2
- fix waitpid() override to not return immediately
* Fri Aug 03 2012 Pádraig Brady <[email protected] - 0.9.17-1
- Update to 0.9.17
* Sat Jul 21 2012 Fedora Release Engineering <[email protected]> - 0.9.16-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Mar 27 2012 Pádraig Brady <[email protected] - 0.9.16-6
- Update patch to avoid leak of _DummyThread objects
* Mon Mar 5 2012 Pádraig Brady <[email protected] - 0.9.16-5
- Fix patch to avoid leak of _DummyThread objects
* Wed Feb 29 2012 Pádraig Brady <[email protected] - 0.9.16-4
- Apply a patch to avoid leak of _DummyThread objects
* Sat Jan 14 2012 Fedora Release Engineering <[email protected]> - 0.9.16-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Nov 09 2011 Pádraig Brady <[email protected] - 0.9.16-2
- Apply a patch to support subprocess.Popen implementations
that accept the timeout parameter, which is the case on RHEL >= 6.1
* Sat Aug 27 2011 Kevin Fenzi <[email protected]> - 0.9.16-1
- Update to 0.9.16
* Tue Feb 08 2011 Fedora Release Engineering <[email protected]> - 0.9.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Sep 08 2010 Lev Shamardin <[email protected]> - 0.9.12-1
- Updated to version 0.9.12.
* Wed Jul 28 2010 Lev Shamardin <[email protected]> - 0.9.9-1
- Updated to version 0.9.9.
* Wed Apr 14 2010 Lev Shamardin <[email protected]> - 0.9.7-1
- Initial package version.