]> git.pld-linux.org Git - packages/python-gevent.git/blame - python-gevent.spec
Run tests in %build
[packages/python-gevent.git] / python-gevent.spec
CommitLineData
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
10Summary: A coroutine-based Python networking library
11Name: python-%{module}
3cc54920 12Version: 1.0
78f066e6
ER
13Release: 1
14License: MIT
15Group: Development/Languages
16URL: http://www.gevent.org/
17Source0: http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
3cc54920 18# Source0-md5: 33aef51a06268f5903fea378e1388e4d
11497ff2 19Source1: known_failures-pld.txt
78f066e6
ER
20BuildRequires: libevent-devel >= 1.4.0
21BuildRequires: python-devel
22BuildRequires: rpm-pythonprov
23Requires: python-greenlet
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71c03694
ER
25
26%description
27gevent is a coroutine-based Python networking library that uses
28greenlet to provide a high-level synchronous API on top of libevent
29event loop.
30
31Features 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
42cat known_failures.txt %{SOURCE1} > known_failures-merged.txt
43
71c03694
ER
44%build
45CC="%{__cc}" \
46CFLAGS="%{rpmcflags}" \
47%{__python} setup.py build
48
49%install
50rm -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}
59cd greentest
60PYTHONPATH=.. python testrunner.py --expected ../known_failures-merged.txt
61cd ..
62%endif
63
71c03694
ER
64%clean
65rm -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
This page took 0.107442 seconds and 4 git commands to generate.