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