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
15 Summary: A coroutine-based Python networking library
16 Name: python-%{module}
20 Group: Development/Languages
21 Source0: http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
22 # Source0-md5: 117f135d57ca7416203fba3720bf71c1
23 Patch0: known_failures-pld.patch
24 URL: http://www.gevent.org/
25 %{?with_system_c_ares:BuildRequires: c-ares-devel >= 1.10.0}
26 %{?with_system_libev:BuildRequires: libev-devel >= 4.11}
27 #BuildRequires: python-Cython
28 BuildRequires: python-devel
30 BuildRequires: python-devel-src
31 BuildRequires: python-greenlet >= 0.3.2
32 BuildRequires: python-test
33 BuildRequires: rpmbuild(macros) >= 1.688
35 BuildRequires: rpm-pythonprov
36 Requires: python-greenlet >= 0.3.2
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 gevent is a coroutine-based Python networking library.
44 - Fast event loop based on libev.
45 - Lightweight execution units based on greenlet.
46 - Familiar API that re-uses concepts from the Python standard library.
47 - Cooperative sockets with SSL support.
48 - DNS queries performed through c-ares or a threadpool.
49 - Ability to use standard library and 3rd party modules written for
50 standard blocking sockets
53 %setup -q -n %{module}-%{version}
57 # when Cython-generated files are to be rebuilt
58 # (BR: python-Cython must be enabled then too)
59 # ln -s Makefile.ext Makefile
62 CFLAGS="%{rpmcflags}" \
63 %{?with_system_libev:LIBEV_EMBED=false} \
64 %{?with_system_c_ares:CARES_EMBED=false} \
65 %{__python} setup.py build
69 PYTHONPATH=.. python testrunner.py --config ../known_failures.py
74 rm -rf $RPM_BUILD_ROOT
76 %{?with_system_libev:LIBEV_EMBED=false} \
77 %{?with_system_c_ares:CARES_EMBED=false} \
78 %{__python} setup.py install \
81 --root=$RPM_BUILD_ROOT
86 rm -rf $RPM_BUILD_ROOT
89 %defattr(644,root,root,755)
90 %doc LICENSE README.rst
91 %dir %{py_sitedir}/%{module}
92 %{py_sitedir}/%{module}/*.py[co]
93 %attr(755,root,root) %{py_sitedir}/%{module}/_semaphore.so
94 %attr(755,root,root) %{py_sitedir}/%{module}/_util.so
95 %attr(755,root,root) %{py_sitedir}/%{module}/ares.so
96 %attr(755,root,root) %{py_sitedir}/%{module}/core.so
97 %if "%{py_ver}" > "2.4"
98 %{py_sitedir}/%{module}-%{version}-py%{py_ver}.egg-info