3 # - SSL Broken with python 2.7.9
4 # https://github.com/gevent/gevent/issues/477
6 # - test__core_stat.py fails on 32-bit builds with system libev
7 # investigate/fix that and enable system libev
9 # - investigate some other failing tests
10 # (now excluded via known_failures-pld.txt)
13 %bcond_without tests # do not run tests
14 %bcond_with system_libev # build with system libev (more tests will fail)
15 %bcond_without system_c_ares # build with system c_ares
18 Summary: A coroutine-based Python networking library
19 Name: python-%{module}
23 Group: Development/Languages
24 URL: http://www.gevent.org/
25 Source0: http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
26 # Source0-md5: 7b952591d1a0174d6eb6ac47bd975ab6
27 Source1: known_failures-pld.txt
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
31 BuildRequires: python-devel
33 BuildRequires: python-devel-src
34 BuildRequires: python-greenlet >= 0.3.2
35 BuildRequires: python-test
36 BuildRequires: rpmbuild(macros) >= 1.688
38 BuildRequires: rpm-pythonprov
39 Requires: python-greenlet >= 0.3.2
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 gevent is a coroutine-based Python networking library.
47 - Fast event loop based on libev.
48 - Lightweight execution units based on greenlet.
49 - Familiar API that re-uses concepts from the Python standard library.
50 - Cooperative sockets with SSL support.
51 - DNS queries performed through c-ares or a threadpool.
52 - Ability to use standard library and 3rd party modules written for
53 standard blocking sockets
56 %setup -q -n %{module}-%{version}
58 cat known_failures.py %{SOURCE1} > known_failures-merged.py
62 # when Cython-generated files are to be rebuilt
63 # (BR: python-Cython must be enabled then too)
64 # ln -s Makefile.ext Makefile
67 CFLAGS="%{rpmcflags}" \
68 %{?with_system_libev:LIBEV_EMBED=false} \
69 %{?with_system_c_ares:CARES_EMBED=false} \
70 %{__python} setup.py build
74 PYTHONPATH=.. python testrunner.py --config ../known_failures-merged.py
79 rm -rf $RPM_BUILD_ROOT
81 %{?with_system_libev:LIBEV_EMBED=false} \
82 %{?with_system_c_ares:CARES_EMBED=false} \
83 %{__python} setup.py install \
86 --root=$RPM_BUILD_ROOT
91 rm -rf $RPM_BUILD_ROOT
94 %defattr(644,root,root,755)
95 %doc LICENSE README.rst
96 %dir %{py_sitedir}/%{module}
97 %{py_sitedir}/%{module}/*.py[co]
98 %attr(755,root,root) %{py_sitedir}/%{module}/_semaphore.so
99 %attr(755,root,root) %{py_sitedir}/%{module}/_util.so
100 %attr(755,root,root) %{py_sitedir}/%{module}/ares.so
101 %attr(755,root,root) %{py_sitedir}/%{module}/core.so
102 %if "%{py_ver}" > "2.4"
103 %{py_sitedir}/%{module}-%{version}-py%{py_ver}.egg-info