]> git.pld-linux.org Git - packages/python-gevent.git/blame - python-gevent.spec
- python 3.6
[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}
4fc6ecf8 19Version: 1.1.0
079b59ab 20Release: 2
4fc6ecf8 21Epoch: 1
78f066e6
ER
22License: MIT
23Group: Development/Languages
78f066e6 24Source0: http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
4fc6ecf8 25# Source0-md5: 24b3e44134fbff250526f3b949763f99
2fed4eba
ER
26Patch0: known_failures-pld.patch
27URL: http://www.gevent.org/
140cee97
JK
28%{?with_system_c_ares:BuildRequires: c-ares-devel >= 1.10.0}
29%{?with_system_libev:BuildRequires: libev-devel >= 4.11}
282f7bb0 30#BuildRequires: python-Cython
06c1ffe6 31%if %{with python2}
78f066e6 32BuildRequires: python-devel
7c3f7ce6 33%if %{with tests}
282f7bb0 34BuildRequires: python-devel-src
73d3206b
JK
35BuildRequires: python-greenlet >= 0.3.2
36BuildRequires: python-test
06c1ffe6
AM
37%endif
38%endif
39%if %{with python3}
40BuildRequires: python3-devel
41%if %{with tests}
42BuildRequires: python3-greenlet >= 0.3.2
43BuildRequires: python3-test
44%endif
7c3f7ce6 45%endif
78f066e6 46BuildRequires: rpm-pythonprov
cc06e72e 47BuildRequires: rpmbuild(macros) >= 1.710
27ee9f05 48Requires: python-greenlet >= 0.3.2
78f066e6 49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71c03694
ER
50
51%description
282f7bb0 52gevent is a coroutine-based Python networking library.
71c03694
ER
53
54Features include:
282f7bb0 55
06c1ffe6
AM
56- Fast event loop based on libev.
57- Lightweight execution units based on greenlet.
58- Familiar API that re-uses concepts from the Python standard library.
59- Cooperative sockets with SSL support.
60- DNS queries performed through c-ares or a threadpool.
61- Ability to use standard library and 3rd party modules written for
62 standard blocking sockets
63
64%package -n python3-%{module}
65Summary: A coroutine-based Python networking library
66Group: Libraries/Python
67Requires: python-greenlet >= 0.3.2
68
69%description -n python3-%{module}
70gevent is a coroutine-based Python networking library.
71
72Features include:
73
282f7bb0
JK
74- Fast event loop based on libev.
75- Lightweight execution units based on greenlet.
76- Familiar API that re-uses concepts from the Python standard library.
77- Cooperative sockets with SSL support.
78- DNS queries performed through c-ares or a threadpool.
79- Ability to use standard library and 3rd party modules written for
6c017ba8 80 standard blocking sockets
71c03694
ER
81
82%prep
83%setup -q -n %{module}-%{version}
2fed4eba 84%patch0 -p1
11497ff2 85
71c03694 86%build
282f7bb0
JK
87# when Cython-generated files are to be rebuilt
88# (BR: python-Cython must be enabled then too)
89# ln -s Makefile.ext Makefile
90
06c1ffe6 91%if %{with python2}
71c03694
ER
92CC="%{__cc}" \
93CFLAGS="%{rpmcflags}" \
282f7bb0
JK
94%{?with_system_libev:LIBEV_EMBED=false} \
95%{?with_system_c_ares:CARES_EMBED=false} \
37c131a9 96%py_build
71c03694 97
31e6d75d
JK
98%if %{with tests}
99cd greentest
06c1ffe6 100PYTHONPATH=$PWD/$(ls -1d ../build-2/lib.*) %{__python} testrunner.py --config ../known_failures.py
31e6d75d
JK
101cd ..
102%endif
06c1ffe6
AM
103%endif
104
105%if %{with python3}
106CC="%{__cc}" \
107CFLAGS="%{rpmcflags}" \
108%{?with_system_libev:LIBEV_EMBED=false} \
109%{?with_system_c_ares:CARES_EMBED=false} \
37c131a9 110%py3_build
06c1ffe6
AM
111
112%if %{with tests}
113cd greentest
114PYTHONPATH=$PWD/$(ls -1d ../build-3/lib.*) %{__python3} testrunner.py --config ../known_failures.py
115cd ..
116%endif
117%endif
31e6d75d 118
71c03694
ER
119%install
120rm -rf $RPM_BUILD_ROOT
282f7bb0 121
06c1ffe6 122%if %{with python2}
282f7bb0
JK
123%{?with_system_libev:LIBEV_EMBED=false} \
124%{?with_system_c_ares:CARES_EMBED=false} \
37c131a9 125%py_install
71c03694
ER
126
127%py_postclean
06c1ffe6
AM
128%endif
129
130%if %{with python3}
131%{?with_system_libev:LIBEV_EMBED=false} \
132%{?with_system_c_ares:CARES_EMBED=false} \
37c131a9 133%py3_install
06c1ffe6 134%endif
71c03694
ER
135
136%clean
137rm -rf $RPM_BUILD_ROOT
138
06c1ffe6 139%if %{with python2}
71c03694
ER
140%files
141%defattr(644,root,root,755)
142%doc LICENSE README.rst
78f066e6 143%dir %{py_sitedir}/%{module}
71c03694 144%{py_sitedir}/%{module}/*.py[co]
0f612c0f 145%attr(755,root,root) %{py_sitedir}/%{module}/_semaphore.so
0f612c0f 146%attr(755,root,root) %{py_sitedir}/%{module}/ares.so
4fc6ecf8 147%attr(755,root,root) %{py_sitedir}/%{module}/corecext.so
71c03694
ER
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
06c1ffe6 161%attr(755,root,root) %{py3_sitedir}/%{module}/ares*.so
4fc6ecf8 162%attr(755,root,root) %{py3_sitedir}/%{module}/corecext*.so
06c1ffe6
AM
163%{py3_sitedir}/%{module}-%{version}-py*.egg-info
164%endif
This page took 1.178698 seconds and 4 git commands to generate.