3 # - investigate some of the failing tests
4 # (now excluded via known_failures-pld.txt)
7 %bcond_without tests # do not run tests
8 %bcond_without system_libev # build with system libev (more tests will fail)
9 %bcond_without system_c_ares # build with system c_ares
12 Summary: A coroutine-based Python networking library
13 Name: python-%{module}
17 Group: Development/Languages
18 URL: http://www.gevent.org/
19 Source0: http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
20 # Source0-md5: 33aef51a06268f5903fea378e1388e4d
21 Source1: known_failures-pld.txt
22 %{?with_system_libev:BuildRequires: c-ares-devel >= 1.10.0}
23 %{?with_system_c_ares:BuildRequires: libev-devel >= 4.11}
24 #BuildRequires: python-Cython
25 BuildRequires: python-devel
27 BuildRequires: python-devel-src
28 BuildRequires: python-greenlet >= 0.3.2
29 BuildRequires: python-test
30 BuildRequires: rpmbuild(macros) >= 1.688
32 BuildRequires: rpm-pythonprov
33 Requires: python-greenlet >= 0.3.2
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 gevent is a coroutine-based Python networking library.
41 - Fast event loop based on libev.
42 - Lightweight execution units based on greenlet.
43 - Familiar API that re-uses concepts from the Python standard library.
44 - Cooperative sockets with SSL support.
45 - DNS queries performed through c-ares or a threadpool.
46 - Ability to use standard library and 3rd party modules written for
47 standard blo cking sockets
50 %setup -q -n %{module}-%{version}
52 cat known_failures.txt %{SOURCE1} > known_failures-merged.txt
55 # when Cython-generated files are to be rebuilt
56 # (BR: python-Cython must be enabled then too)
57 # ln -s Makefile.ext Makefile
60 CFLAGS="%{rpmcflags}" \
61 %{?with_system_libev:LIBEV_EMBED=false} \
62 %{?with_system_c_ares:CARES_EMBED=false} \
63 %{__python} setup.py build
67 PYTHONPATH=.. python testrunner.py --expected ../known_failures-merged.txt
72 rm -rf $RPM_BUILD_ROOT
74 %{?with_system_libev:LIBEV_EMBED=false} \
75 %{?with_system_c_ares:CARES_EMBED=false} \
76 %{__python} setup.py install \
79 --root=$RPM_BUILD_ROOT
84 rm -rf $RPM_BUILD_ROOT
87 %defattr(644,root,root,755)
88 %doc LICENSE README.rst
89 %dir %{py_sitedir}/%{module}
90 %{py_sitedir}/%{module}/*.py[co]
91 %attr(755,root,root) %{py_sitedir}/%{module}/_semaphore.so
92 %attr(755,root,root) %{py_sitedir}/%{module}/_util.so
93 %attr(755,root,root) %{py_sitedir}/%{module}/ares.so
94 %attr(755,root,root) %{py_sitedir}/%{module}/core.so
95 %if "%{py_ver}" > "2.4"
96 %{py_sitedir}/%{module}-%{version}-py%{py_ver}.egg-info