]>
Commit | Line | Data |
---|---|---|
11497ff2 JK |
1 | |
2 | # TODO: | |
3 | # - investigate some of the failing tests | |
4 | # (now excluded via known_failures-pld.txt) | |
5 | ||
6 | # Conditional build: | |
7 | %bcond_without tests # do not run tests | |
8 | ||
71c03694 | 9 | %define module gevent |
78f066e6 ER |
10 | Summary: A coroutine-based Python networking library |
11 | Name: python-%{module} | |
3cc54920 | 12 | Version: 1.0 |
78f066e6 ER |
13 | Release: 1 |
14 | License: MIT | |
15 | Group: Development/Languages | |
16 | URL: http://www.gevent.org/ | |
17 | Source0: http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz | |
3cc54920 | 18 | # Source0-md5: 33aef51a06268f5903fea378e1388e4d |
11497ff2 | 19 | Source1: known_failures-pld.txt |
78f066e6 ER |
20 | BuildRequires: libevent-devel >= 1.4.0 |
21 | BuildRequires: python-devel | |
22 | BuildRequires: rpm-pythonprov | |
23 | Requires: python-greenlet | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
71c03694 ER |
25 | |
26 | %description | |
27 | gevent is a coroutine-based Python networking library that uses | |
28 | greenlet to provide a high-level synchronous API on top of libevent | |
29 | event loop. | |
30 | ||
31 | Features include: | |
32 | - convenient API around greenlets | |
33 | - familiar synchronization primitives (gevent.event, gevent.queue) | |
34 | - socket module that cooperates | |
35 | - WSGI server on top of libevent-http | |
36 | - DNS requests done through libevent-dns | |
37 | - monkey patching utility to get pure Python modules to cooperate | |
38 | ||
39 | %prep | |
40 | %setup -q -n %{module}-%{version} | |
41 | ||
11497ff2 JK |
42 | cat known_failures.txt %{SOURCE1} > known_failures-merged.txt |
43 | ||
71c03694 ER |
44 | %build |
45 | CC="%{__cc}" \ | |
46 | CFLAGS="%{rpmcflags}" \ | |
47 | %{__python} setup.py build | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | %{__python} setup.py install \ | |
52 | --skip-build \ | |
53 | --optimize=2 \ | |
54 | --root=$RPM_BUILD_ROOT | |
55 | ||
56 | %py_postclean | |
57 | ||
11497ff2 JK |
58 | %if %{with tests} |
59 | cd greentest | |
60 | PYTHONPATH=.. python testrunner.py --expected ../known_failures-merged.txt | |
61 | cd .. | |
62 | %endif | |
63 | ||
71c03694 ER |
64 | %clean |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
69 | %doc LICENSE README.rst | |
78f066e6 | 70 | %dir %{py_sitedir}/%{module} |
71c03694 ER |
71 | %{py_sitedir}/%{module}/*.py[co] |
72 | %attr(755,root,root) %{py_sitedir}/%{module}/core.so | |
73 | %if "%{py_ver}" > "2.4" | |
74 | %{py_sitedir}/%{module}-%{version}-py%{py_ver}.egg-info | |
75 | %endif |