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}
23 Group: Development/Languages
24 Source0: http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
25 # Source0-md5: 24b3e44134fbff250526f3b949763f99
26 Patch0: known_failures-pld.patch
27 URL: http://www.gevent.org/
28 %{?with_system_c_ares:BuildRequires: c-ares-devel >= 1.10.0}
29 %{?with_system_libev:BuildRequires: libev-devel >= 4.11}
30 #BuildRequires: python-Cython
32 BuildRequires: python-devel
34 BuildRequires: python-devel-src
35 BuildRequires: python-greenlet >= 0.3.2
36 BuildRequires: python-test
40 BuildRequires: python3-devel
42 BuildRequires: python3-greenlet >= 0.3.2
43 BuildRequires: python3-test
46 BuildRequires: rpm-pythonprov
47 BuildRequires: rpmbuild(macros) >= 1.710
48 Requires: python-greenlet >= 0.3.2
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 gevent is a coroutine-based Python networking library.
56 - Fast event loop based on libev.
57 - Lightweight execution units based on greenlet.
58 - Familiar API that re-uses concepts from the Python standard library.
59 - Cooperative sockets with SSL support.
60 - DNS queries performed through c-ares or a threadpool.
61 - Ability to use standard library and 3rd party modules written for
62 standard blocking sockets
64 %package -n python3-%{module}
65 Summary: A coroutine-based Python networking library
66 Group: Libraries/Python
67 Requires: python-greenlet >= 0.3.2
69 %description -n python3-%{module}
70 gevent is a coroutine-based Python networking library.
74 - Fast event loop based on libev.
75 - Lightweight execution units based on greenlet.
76 - Familiar API that re-uses concepts from the Python standard library.
77 - Cooperative sockets with SSL support.
78 - DNS queries performed through c-ares or a threadpool.
79 - Ability to use standard library and 3rd party modules written for
80 standard blocking sockets
83 %setup -q -n %{module}-%{version}
87 # when Cython-generated files are to be rebuilt
88 # (BR: python-Cython must be enabled then too)
89 # ln -s Makefile.ext Makefile
93 CFLAGS="%{rpmcflags}" \
94 %{?with_system_libev:LIBEV_EMBED=false} \
95 %{?with_system_c_ares:CARES_EMBED=false} \
100 PYTHONPATH=$PWD/$(ls -1d ../build-2/lib.*) %{__python} testrunner.py --config ../known_failures.py
107 CFLAGS="%{rpmcflags}" \
108 %{?with_system_libev:LIBEV_EMBED=false} \
109 %{?with_system_c_ares:CARES_EMBED=false} \
114 PYTHONPATH=$PWD/$(ls -1d ../build-3/lib.*) %{__python3} testrunner.py --config ../known_failures.py
120 rm -rf $RPM_BUILD_ROOT
123 %{?with_system_libev:LIBEV_EMBED=false} \
124 %{?with_system_c_ares:CARES_EMBED=false} \
131 %{?with_system_libev:LIBEV_EMBED=false} \
132 %{?with_system_c_ares:CARES_EMBED=false} \
137 rm -rf $RPM_BUILD_ROOT
141 %defattr(644,root,root,755)
142 %doc LICENSE README.rst
143 %dir %{py_sitedir}/%{module}
144 %{py_sitedir}/%{module}/*.py[co]
145 %attr(755,root,root) %{py_sitedir}/%{module}/_semaphore.so
146 %attr(755,root,root) %{py_sitedir}/%{module}/ares.so
147 %attr(755,root,root) %{py_sitedir}/%{module}/corecext.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}/ares*.so
162 %attr(755,root,root) %{py3_sitedir}/%{module}/corecext*.so
163 %{py3_sitedir}/%{module}-%{version}-py*.egg-info