]> git.pld-linux.org Git - packages/python-gevent.git/blob - python-gevent.spec
move tests run to %build, when it belongs
[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 %{?with_tests:BuildRequires: python-test}
23 BuildRequires:  rpm-pythonprov
24 Requires:       python-greenlet
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 gevent is a coroutine-based Python networking library that uses
29 greenlet to provide a high-level synchronous API on top of libevent
30 event loop.
31
32 Features include:
33   - convenient API around greenlets
34   - familiar synchronization primitives (gevent.event, gevent.queue)
35   - socket module that cooperates
36   - WSGI server on top of libevent-http
37   - DNS requests done through libevent-dns
38   - monkey patching utility to get pure Python modules to cooperate
39
40 %prep
41 %setup -q -n %{module}-%{version}
42
43 cat known_failures.txt %{SOURCE1} > known_failures-merged.txt
44
45 %build
46 CC="%{__cc}" \
47 CFLAGS="%{rpmcflags}" \
48 %{__python} setup.py build
49
50 %if %{with tests}
51 cd greentest
52 PYTHONPATH=.. python testrunner.py --expected ../known_failures-merged.txt
53 cd ..
54 %endif
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 %{__python} setup.py install \
59     --skip-build \
60     --optimize=2 \
61     --root=$RPM_BUILD_ROOT
62
63 %py_postclean
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %files
69 %defattr(644,root,root,755)
70 %doc LICENSE README.rst
71 %dir %{py_sitedir}/%{module}
72 %{py_sitedir}/%{module}/*.py[co]
73 %attr(755,root,root) %{py_sitedir}/%{module}/_semaphore.so
74 %attr(755,root,root) %{py_sitedir}/%{module}/_util.so
75 %attr(755,root,root) %{py_sitedir}/%{module}/ares.so
76 %attr(755,root,root) %{py_sitedir}/%{module}/core.so
77 %if "%{py_ver}" > "2.4"
78 %{py_sitedir}/%{module}-%{version}-py%{py_ver}.egg-info
79 %endif
This page took 0.061606 seconds and 4 git commands to generate.