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: e120a6672feecbbc38b2fe1757ae6099
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.710
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} \
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} \
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} \
130 %{?with_system_libev:LIBEV_EMBED=false} \
131 %{?with_system_c_ares:CARES_EMBED=false} \
136 rm -rf $RPM_BUILD_ROOT
140 %defattr(644,root,root,755)
141 %doc LICENSE README.rst
142 %dir %{py_sitedir}/%{module}
143 %{py_sitedir}/%{module}/*.py[co]
144 %attr(755,root,root) %{py_sitedir}/%{module}/_semaphore.so
145 %attr(755,root,root) %{py_sitedir}/%{module}/_util.so
146 %attr(755,root,root) %{py_sitedir}/%{module}/ares.so
147 %attr(755,root,root) %{py_sitedir}/%{module}/core.so
148 %if "%{py_ver}" > "2.4"
149 %{py_sitedir}/%{module}-%{version}-py%{py_ver}.egg-info
154 %files -n python3-%{module}
155 %defattr(644,root,root,755)
156 %doc LICENSE README.rst
157 %dir %{py3_sitedir}/%{module}
158 %{py3_sitedir}/%{module}/__pycache__
159 %{py3_sitedir}/%{module}/*.py*
160 %attr(755,root,root) %{py3_sitedir}/%{module}/_semaphore*.so
161 %attr(755,root,root) %{py3_sitedir}/%{module}/_util*.so
162 %attr(755,root,root) %{py3_sitedir}/%{module}/ares*.so
163 %attr(755,root,root) %{py3_sitedir}/%{module}/core*.so
164 %{py3_sitedir}/%{module}-%{version}-py*.egg-info