]> git.pld-linux.org Git - packages/python-gevent.git/blob - python-gevent.spec
attempt to convert known failures to new format
[packages/python-gevent.git] / python-gevent.spec
1
2 # TODO:
3 #       - SSL Broken with python 2.7.9
4 #         https://github.com/gevent/gevent/issues/477
5 #
6 #       - test__core_stat.py fails on 32-bit builds with system libev
7 #         investigate/fix that and enable system libev
8 #
9 #       - investigate some other failing tests
10 #         (now excluded via known_failures-pld.txt)
11
12 # Conditional build:
13 %bcond_without  tests   # do not run tests
14 %bcond_with     system_libev    # build with system libev (more tests will fail)
15 %bcond_without  system_c_ares   # build with system c_ares
16
17 %define     module  gevent
18 Summary:        A coroutine-based Python networking library
19 Name:           python-%{module}
20 Version:        1.0.1
21 Release:        1
22 License:        MIT
23 Group:          Development/Languages
24 Source0:        http://pypi.python.org/packages/source/g/gevent/%{module}-%{version}.tar.gz
25 # Source0-md5:  7b952591d1a0174d6eb6ac47bd975ab6
26 Patch0:         known_failures-pld.patch
27 URL:            http://www.gevent.org/
28 %{?with_system_c_ares:BuildRequires:    c-ares-devel >= 1.10.0}
29 %{?with_system_libev:BuildRequires:     libev-devel >= 4.11}
30 #BuildRequires: python-Cython
31 BuildRequires:  python-devel
32 %if %{with tests}
33 BuildRequires:  python-devel-src
34 BuildRequires:  python-greenlet >= 0.3.2
35 BuildRequires:  python-test
36 BuildRequires:  rpmbuild(macros) >= 1.688
37 %endif
38 BuildRequires:  rpm-pythonprov
39 Requires:       python-greenlet >= 0.3.2
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 gevent is a coroutine-based Python networking library.
44
45 Features include:
46
47 - Fast event loop based on libev.
48 - Lightweight execution units based on greenlet.
49 - Familiar API that re-uses concepts from the Python standard library.
50 - Cooperative sockets with SSL support.
51 - DNS queries performed through c-ares or a threadpool.
52 - Ability to use standard library and 3rd party modules written for
53   standard blocking sockets
54
55 %prep
56 %setup -q -n %{module}-%{version}
57 %patch0 -p1
58
59 %build
60 # when Cython-generated files are to be rebuilt
61 # (BR: python-Cython must be enabled then too)
62 # ln -s Makefile.ext Makefile
63
64 CC="%{__cc}" \
65 CFLAGS="%{rpmcflags}" \
66 %{?with_system_libev:LIBEV_EMBED=false} \
67 %{?with_system_c_ares:CARES_EMBED=false} \
68 %{__python} setup.py build
69
70 %if %{with tests}
71 cd greentest
72 PYTHONPATH=.. python testrunner.py --config ../known_failures.py
73 cd ..
74 %endif
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %{?with_system_libev:LIBEV_EMBED=false} \
80 %{?with_system_c_ares:CARES_EMBED=false} \
81 %{__python} setup.py install \
82     --skip-build \
83     --optimize=2 \
84     --root=$RPM_BUILD_ROOT
85
86 %py_postclean
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %files
92 %defattr(644,root,root,755)
93 %doc LICENSE README.rst
94 %dir %{py_sitedir}/%{module}
95 %{py_sitedir}/%{module}/*.py[co]
96 %attr(755,root,root) %{py_sitedir}/%{module}/_semaphore.so
97 %attr(755,root,root) %{py_sitedir}/%{module}/_util.so
98 %attr(755,root,root) %{py_sitedir}/%{module}/ares.so
99 %attr(755,root,root) %{py_sitedir}/%{module}/core.so
100 %if "%{py_ver}" > "2.4"
101 %{py_sitedir}/%{module}-%{version}-py%{py_ver}.egg-info
102 %endif
This page took 0.102646 seconds and 4 git commands to generate.