]> git.pld-linux.org Git - packages/python-gevent.git/blob - python-gevent.spec
Run tests in %build
[packages/python-gevent.git] / python-gevent.spec
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
9 %define     module  gevent
10 Summary:        A coroutine-based Python networking library
11 Name:           python-%{module}
12 Version:        1.0
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
18 # Source0-md5:  33aef51a06268f5903fea378e1388e4d
19 Source1:        known_failures-pld.txt
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)
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
42 cat known_failures.txt %{SOURCE1} > known_failures-merged.txt
43
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
58 %if %{with tests}
59 cd greentest
60 PYTHONPATH=.. python testrunner.py --expected ../known_failures-merged.txt
61 cd ..
62 %endif
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %files
68 %defattr(644,root,root,755)
69 %doc LICENSE README.rst
70 %dir %{py_sitedir}/%{module}
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
This page took 0.052492 seconds and 3 git commands to generate.