]> git.pld-linux.org Git - packages/python-gevent.git/blame - python-gevent.spec
Test config patch from DEVEL branch
[packages/python-gevent.git] / python-gevent.spec
CommitLineData
11497ff2
JK
1
2# TODO:
19395fb4
JK
3# - test__core_stat.py fails on 32-bit builds with system libev
4# investigate/fix that and enable system libev
5#
6# - investigate some other failing tests
5a77c3db 7# (now excluded via known_failures-pld.patch)
11497ff2
JK
8
9# Conditional build:
10%bcond_without tests # do not run tests
19395fb4 11%bcond_with system_libev # build with system libev (more tests will fail)
282f7bb0 12%bcond_without system_c_ares # build with system c_ares
06c1ffe6
AM
13%bcond_without python2 # CPython 2.x module
14%bcond_without python3 # CPython 3.x module
11497ff2 15
71c03694 16%define module gevent
78f066e6
ER
17Summary: A coroutine-based Python networking library
18Name: python-%{module}
06c1ffe6 19Version: 1.1b2
6c017ba8 20Release: 1
78f066e6
ER
21License: MIT
22Group: Development/Languages
78f066e6 23Source0: http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
06c1ffe6 24# Source0-md5: 66a0da28e731ede2cf0422fc0a63f873
2fed4eba
ER
25Patch0: known_failures-pld.patch
26URL: http://www.gevent.org/
140cee97
JK
27%{?with_system_c_ares:BuildRequires: c-ares-devel >= 1.10.0}
28%{?with_system_libev:BuildRequires: libev-devel >= 4.11}
282f7bb0 29#BuildRequires: python-Cython
06c1ffe6 30%if %{with python2}
78f066e6 31BuildRequires: python-devel
7c3f7ce6 32%if %{with tests}
282f7bb0 33BuildRequires: python-devel-src
73d3206b
JK
34BuildRequires: python-greenlet >= 0.3.2
35BuildRequires: python-test
06c1ffe6
AM
36%endif
37%endif
38%if %{with python3}
39BuildRequires: python3-devel
40%if %{with tests}
41BuildRequires: python3-greenlet >= 0.3.2
42BuildRequires: python3-test
43%endif
7c3f7ce6 44%endif
78f066e6 45BuildRequires: rpm-pythonprov
06c1ffe6 46BuildRequires: rpmbuild(macros) >= 1.688
27ee9f05 47Requires: python-greenlet >= 0.3.2
78f066e6 48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71c03694
ER
49
50%description
282f7bb0 51gevent is a coroutine-based Python networking library.
71c03694
ER
52
53Features include:
282f7bb0 54
06c1ffe6
AM
55- Fast event loop based on libev.
56- Lightweight execution units based on greenlet.
57- Familiar API that re-uses concepts from the Python standard library.
58- Cooperative sockets with SSL support.
59- DNS queries performed through c-ares or a threadpool.
60- Ability to use standard library and 3rd party modules written for
61 standard blocking sockets
62
63%package -n python3-%{module}
64Summary: A coroutine-based Python networking library
65Group: Libraries/Python
66Requires: python-greenlet >= 0.3.2
67
68%description -n python3-%{module}
69gevent is a coroutine-based Python networking library.
70
71Features include:
72
282f7bb0
JK
73- Fast event loop based on libev.
74- Lightweight execution units based on greenlet.
75- Familiar API that re-uses concepts from the Python standard library.
76- Cooperative sockets with SSL support.
77- DNS queries performed through c-ares or a threadpool.
78- Ability to use standard library and 3rd party modules written for
6c017ba8 79 standard blocking sockets
71c03694
ER
80
81%prep
82%setup -q -n %{module}-%{version}
2fed4eba 83%patch0 -p1
11497ff2 84
71c03694 85%build
282f7bb0
JK
86# when Cython-generated files are to be rebuilt
87# (BR: python-Cython must be enabled then too)
88# ln -s Makefile.ext Makefile
89
06c1ffe6 90%if %{with python2}
71c03694
ER
91CC="%{__cc}" \
92CFLAGS="%{rpmcflags}" \
282f7bb0
JK
93%{?with_system_libev:LIBEV_EMBED=false} \
94%{?with_system_c_ares:CARES_EMBED=false} \
06c1ffe6 95%{__python} setup.py build --build-base build-2
71c03694 96
31e6d75d
JK
97%if %{with tests}
98cd greentest
06c1ffe6 99PYTHONPATH=$PWD/$(ls -1d ../build-2/lib.*) %{__python} testrunner.py --config ../known_failures.py
31e6d75d
JK
100cd ..
101%endif
06c1ffe6
AM
102%endif
103
104%if %{with python3}
105CC="%{__cc}" \
106CFLAGS="%{rpmcflags}" \
107%{?with_system_libev:LIBEV_EMBED=false} \
108%{?with_system_c_ares:CARES_EMBED=false} \
109%{__python3} setup.py build --build-base build-3
110
111%if %{with tests}
112cd greentest
113PYTHONPATH=$PWD/$(ls -1d ../build-3/lib.*) %{__python3} testrunner.py --config ../known_failures.py
114cd ..
115%endif
116%endif
31e6d75d 117
71c03694
ER
118%install
119rm -rf $RPM_BUILD_ROOT
282f7bb0 120
06c1ffe6 121%if %{with python2}
282f7bb0
JK
122%{?with_system_libev:LIBEV_EMBED=false} \
123%{?with_system_c_ares:CARES_EMBED=false} \
06c1ffe6
AM
124%{__python} setup.py \
125 build --build-base build-2 \
126 install --skip-build \
127 --optimize=2 \
128 --root=$RPM_BUILD_ROOT
71c03694
ER
129
130%py_postclean
06c1ffe6
AM
131%endif
132
133%if %{with python3}
134%{?with_system_libev:LIBEV_EMBED=false} \
135%{?with_system_c_ares:CARES_EMBED=false} \
136%{__python3} setup.py \
137 build --build-base build-3 \
138 install --skip-build \
139 --optimize=2 \
140 --root=$RPM_BUILD_ROOT
141%endif
71c03694
ER
142
143%clean
144rm -rf $RPM_BUILD_ROOT
145
06c1ffe6 146%if %{with python2}
71c03694
ER
147%files
148%defattr(644,root,root,755)
149%doc LICENSE README.rst
78f066e6 150%dir %{py_sitedir}/%{module}
71c03694 151%{py_sitedir}/%{module}/*.py[co]
0f612c0f
JK
152%attr(755,root,root) %{py_sitedir}/%{module}/_semaphore.so
153%attr(755,root,root) %{py_sitedir}/%{module}/_util.so
154%attr(755,root,root) %{py_sitedir}/%{module}/ares.so
71c03694
ER
155%attr(755,root,root) %{py_sitedir}/%{module}/core.so
156%if "%{py_ver}" > "2.4"
157%{py_sitedir}/%{module}-%{version}-py%{py_ver}.egg-info
158%endif
06c1ffe6
AM
159%endif
160
161%if %{with python3}
162%files -n python3-%{module}
163%defattr(644,root,root,755)
164%doc LICENSE README.rst
165%dir %{py3_sitedir}/%{module}
166%{py3_sitedir}/%{module}/__pycache__
167%{py3_sitedir}/%{module}/*.py*
168%attr(755,root,root) %{py3_sitedir}/%{module}/_semaphore*.so
169%attr(755,root,root) %{py3_sitedir}/%{module}/_util*.so
170%attr(755,root,root) %{py3_sitedir}/%{module}/ares*.so
171%attr(755,root,root) %{py3_sitedir}/%{module}/core*.so
172%{py3_sitedir}/%{module}-%{version}-py*.egg-info
173%endif
This page took 0.094028 seconds and 4 git commands to generate.