]> git.pld-linux.org Git - packages/python-gevent.git/blame - python-gevent.spec
BR: rpmbuild(macros) >= 1.710
[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}
332badf1 19Version: 1.1b5
0af4ec69 20Release: 2
78f066e6
ER
21License: MIT
22Group: Development/Languages
78f066e6 23Source0: http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
332badf1 24# Source0-md5: e120a6672feecbbc38b2fe1757ae6099
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
cc06e72e 46BuildRequires: rpmbuild(macros) >= 1.710
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} \
37c131a9 95%py_build
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} \
37c131a9 109%py3_build
06c1ffe6
AM
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} \
37c131a9 124%py_install
71c03694
ER
125
126%py_postclean
06c1ffe6
AM
127%endif
128
129%if %{with python3}
130%{?with_system_libev:LIBEV_EMBED=false} \
131%{?with_system_c_ares:CARES_EMBED=false} \
37c131a9 132%py3_install
06c1ffe6 133%endif
71c03694
ER
134
135%clean
136rm -rf $RPM_BUILD_ROOT
137
06c1ffe6 138%if %{with python2}
71c03694
ER
139%files
140%defattr(644,root,root,755)
141%doc LICENSE README.rst
78f066e6 142%dir %{py_sitedir}/%{module}
71c03694 143%{py_sitedir}/%{module}/*.py[co]
0f612c0f
JK
144%attr(755,root,root) %{py_sitedir}/%{module}/_semaphore.so
145%attr(755,root,root) %{py_sitedir}/%{module}/_util.so
146%attr(755,root,root) %{py_sitedir}/%{module}/ares.so
71c03694
ER
147%attr(755,root,root) %{py_sitedir}/%{module}/core.so
148%if "%{py_ver}" > "2.4"
149%{py_sitedir}/%{module}-%{version}-py%{py_ver}.egg-info
150%endif
06c1ffe6
AM
151%endif
152
153%if %{with python3}
154%files -n python3-%{module}
155%defattr(644,root,root,755)
156%doc LICENSE README.rst
157%dir %{py3_sitedir}/%{module}
158%{py3_sitedir}/%{module}/__pycache__
159%{py3_sitedir}/%{module}/*.py*
160%attr(755,root,root) %{py3_sitedir}/%{module}/_semaphore*.so
161%attr(755,root,root) %{py3_sitedir}/%{module}/_util*.so
162%attr(755,root,root) %{py3_sitedir}/%{module}/ares*.so
163%attr(755,root,root) %{py3_sitedir}/%{module}/core*.so
164%{py3_sitedir}/%{module}-%{version}-py*.egg-info
165%endif
This page took 0.092436 seconds and 4 git commands to generate.