3 # - test__core_stat.py fails on 32-bit builds with system libev
4 # investigate/fix that and enable system libev
6 # - investigate some other failing tests
7 # (now excluded via known_failures-pld.patch)
10 %bcond_without tests # do not run tests
11 %bcond_with system_libev # build with system libev (more tests will fail)
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
17 Summary: A coroutine-based Python networking library
18 Name: python-%{module}
22 Group: Development/Languages
23 Source0: http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
24 # Source0-md5: 1faddf3de98201793268bf62f9afa103
25 Patch0: known_failures-pld.patch
26 URL: http://www.gevent.org/
27 %{?with_system_c_ares:BuildRequires: c-ares-devel >= 1.10.0}
28 %{?with_system_libev:BuildRequires: libev-devel >= 4.11}
29 #BuildRequires: python-Cython
31 BuildRequires: python-devel
33 BuildRequires: python-devel-src
34 BuildRequires: python-greenlet >= 0.3.2
35 BuildRequires: python-test
39 BuildRequires: python3-devel
41 BuildRequires: python3-greenlet >= 0.3.2
42 BuildRequires: python3-test
45 BuildRequires: rpm-pythonprov
46 BuildRequires: rpmbuild(macros) >= 1.688
47 Requires: python-greenlet >= 0.3.2
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 gevent is a coroutine-based Python networking library.
55 - Fast event loop based on libev.
56 - Lightweight execution units based on greenlet.
57 - Familiar API that re-uses concepts from the Python standard library.
58 - Cooperative sockets with SSL support.
59 - DNS queries performed through c-ares or a threadpool.
60 - Ability to use standard library and 3rd party modules written for
61 standard blocking sockets
63 %package -n python3-%{module}
64 Summary: A coroutine-based Python networking library
65 Group: Libraries/Python
66 Requires: python-greenlet >= 0.3.2
68 %description -n python3-%{module}
69 gevent is a coroutine-based Python networking library.
73 - Fast event loop based on libev.
74 - Lightweight execution units based on greenlet.
75 - Familiar API that re-uses concepts from the Python standard library.
76 - Cooperative sockets with SSL support.
77 - DNS queries performed through c-ares or a threadpool.
78 - Ability to use standard library and 3rd party modules written for
79 standard blocking sockets
82 %setup -q -n %{module}-%{version}
86 # when Cython-generated files are to be rebuilt
87 # (BR: python-Cython must be enabled then too)
88 # ln -s Makefile.ext Makefile
92 CFLAGS="%{rpmcflags}" \
93 %{?with_system_libev:LIBEV_EMBED=false} \
94 %{?with_system_c_ares:CARES_EMBED=false} \
95 %{__python} setup.py build --build-base build-2
99 PYTHONPATH=$PWD/$(ls -1d ../build-2/lib.*) %{__python} testrunner.py --config ../known_failures.py
106 CFLAGS="%{rpmcflags}" \
107 %{?with_system_libev:LIBEV_EMBED=false} \
108 %{?with_system_c_ares:CARES_EMBED=false} \
109 %{__python3} setup.py build --build-base build-3
113 PYTHONPATH=$PWD/$(ls -1d ../build-3/lib.*) %{__python3} testrunner.py --config ../known_failures.py
119 rm -rf $RPM_BUILD_ROOT
122 %{?with_system_libev:LIBEV_EMBED=false} \
123 %{?with_system_c_ares:CARES_EMBED=false} \
124 %{__python} setup.py \
125 build --build-base build-2 \
126 install --skip-build \
128 --root=$RPM_BUILD_ROOT
134 %{?with_system_libev:LIBEV_EMBED=false} \
135 %{?with_system_c_ares:CARES_EMBED=false} \
136 %{__python3} setup.py \
137 build --build-base build-3 \
138 install --skip-build \
140 --root=$RPM_BUILD_ROOT
144 rm -rf $RPM_BUILD_ROOT
148 %defattr(644,root,root,755)
149 %doc LICENSE README.rst
150 %dir %{py_sitedir}/%{module}
151 %{py_sitedir}/%{module}/*.py[co]
152 %attr(755,root,root) %{py_sitedir}/%{module}/_semaphore.so
153 %attr(755,root,root) %{py_sitedir}/%{module}/_util.so
154 %attr(755,root,root) %{py_sitedir}/%{module}/ares.so
155 %attr(755,root,root) %{py_sitedir}/%{module}/core.so
156 %if "%{py_ver}" > "2.4"
157 %{py_sitedir}/%{module}-%{version}-py%{py_ver}.egg-info
162 %files -n python3-%{module}
163 %defattr(644,root,root,755)
164 %doc LICENSE README.rst
165 %dir %{py3_sitedir}/%{module}
166 %{py3_sitedir}/%{module}/__pycache__
167 %{py3_sitedir}/%{module}/*.py*
168 %attr(755,root,root) %{py3_sitedir}/%{module}/_semaphore*.so
169 %attr(755,root,root) %{py3_sitedir}/%{module}/_util*.so
170 %attr(755,root,root) %{py3_sitedir}/%{module}/ares*.so
171 %attr(755,root,root) %{py3_sitedir}/%{module}/core*.so
172 %{py3_sitedir}/%{module}-%{version}-py*.egg-info