1 # TODO: fix green.ssl on Python 3.7
4 %bcond_without doc # Sphinx documentation
5 %bcond_with tests # unit tests [failures with python3.7: green.ssl is broken there, as of 0.23.0]
6 %bcond_without python2 # CPython 2.x module
7 %bcond_without python3 # CPython 3.x module
9 Summary: Highly concurrent networking library for Python 2
10 Summary(pl.UTF-8): Biblioteka sieciowa o dużym stopniu zrównoleglenia dla Pythona 2
15 Group: Development/Languages/Python
16 #Source0Download: https://pypi.org/simple/eventlet/
17 Source0: https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
18 # Source0-md5: 9b459a4d3b1365febd0d22cf71b9e7ce
19 URL: https://pypi.org/project/eventlet/
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: sed >= 4.0
24 BuildRequires: python-devel >= 1:2.6
25 BuildRequires: python-setuptools >= 5.4.1
27 BuildRequires: python-enum34
28 BuildRequires: python-greenlet >= 0.3
29 BuildRequires: python-nose >= 1.3.1
33 BuildRequires: python3-devel >= 1:3.3
34 BuildRequires: python3-setuptools >= 5.4.1
36 %if "%{py3_ver}" < "3.4"
37 BuildRequires: python3-enum34
39 BuildRequires: python3-greenlet >= 0.3
40 BuildRequires: python3-nose >= 1.3.1
43 %{?with_doc:BuildRequires: sphinx-pdg}
45 # SO_REUSEPORT option for tests.convenience_test.test_socket_reuse
46 BuildRequires: uname(release) >= 3.9
48 Requires: python-modules >= 1:2.6
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 Eventlet is a concurrent networking library for Python that allows you
53 to change how you run your code, not how you write it.
55 It uses epoll or libevent for highly scalable non-blocking I/O.
56 Coroutines ensure that the developer uses a blocking style of
57 programming that is similar to threading, but provide the benefits of
58 non-blocking I/O. The event dispatch is implicit, which means you can
59 easily use Eventlet from the Python interpreter, or as a small part of
62 %description -l pl.UTF-8
63 Eventlet to równoległa biblioteka sieciowa dla Ptyhona, pozwalająca na
64 zmianę sposobu uruchamiania kodu bez sposobu pisania go.
66 Biblioteka wykorzystuje epoll lub libevent do wysoko skalowalnych,
67 nieblokujących operacji we/wy. Korutyny zapewniają, że programista
68 korzysta z blokującego stylu programowania, podobnego do wątkowego,
69 ale mającego zalety nieblokującego we/wy. Przekazywania zdarzeń jest
70 domyślne, co oznacza, że można łatwo używać modułu Eventlet z poziomu
71 interpretera Pythona lub jako małej części dużej aplikacji.
73 %package -n python3-eventlet
74 Summary: Highly concurrent networking library for Python 3
75 Summary(pl.UTF-8): Biblioteka sieciowa o dużym stopniu zrównoleglenia dla Pythona 3
76 Group: Development/Languages/Python
77 Requires: python3-modules >= 1:3.3
79 %description -n python3-eventlet
80 Eventlet is a concurrent networking library for Python that allows you
81 to change how you run your code, not how you write it.
83 It uses epoll or libevent for highly scalable non-blocking I/O.
84 Coroutines ensure that the developer uses a blocking style of
85 programming that is similar to threading, but provide the benefits of
86 non-blocking I/O. The event dispatch is implicit, which means you can
87 easily use Eventlet from the Python interpreter, or as a small part of
90 %description -n python3-eventlet -l pl.UTF-8
91 Eventlet to równoległa biblioteka sieciowa dla Ptyhona, pozwalająca na
92 zmianę sposobu uruchamiania kodu bez sposobu pisania go.
94 Biblioteka wykorzystuje epoll lub libevent do wysoko skalowalnych,
95 nieblokujących operacji we/wy. Korutyny zapewniają, że programista
96 korzysta z blokującego stylu programowania, podobnego do wątkowego,
97 ale mającego zalety nieblokującego we/wy. Przekazywania zdarzeń jest
98 domyślne, co oznacza, że można łatwo używać modułu Eventlet z poziomu
99 interpretera Pythona lub jako małej części dużej aplikacji.
102 Summary: API documentation for eventlet module
103 Summary(pl.UTF-8): Dokumentacja API modułu eventlet
105 %if "%{_rpmversion}" >= "5"
110 API documentation for eventlet module.
112 %description apidocs -l pl.UTF-8
113 Dokumentacja API modułu eventlet.
116 %setup -q -n eventlet-%{version}
124 nosetests-%{py_ver} tests
133 nosetests-%{py3_ver} tests
139 %{__make} -C doc -j1 html
143 rm -rf $RPM_BUILD_ROOT
154 %if "%{py3_ver}" >= "3.4"
155 # don't require enum34 on python >= 3.4 (different forms depending on setuptools version)
156 %{__sed} -i -e '/^\[:python_version *< *"3\.4"]/,$ d' \
157 -e '/^enum34;python_version<"3\.4"/d' $RPM_BUILD_ROOT%{py3_sitescriptdir}/eventlet-%{version}-py*.egg-info/requires.txt
162 rm -rf $RPM_BUILD_ROOT
166 %defattr(644,root,root,755)
167 %doc AUTHORS LICENSE NEWS README.rst
168 %{py_sitescriptdir}/eventlet
169 %{py_sitescriptdir}/eventlet-%{version}-py*.egg-info
173 %files -n python3-eventlet
174 %defattr(644,root,root,755)
175 %doc AUTHORS LICENSE NEWS README.rst
176 %{py3_sitescriptdir}/eventlet
177 %{py3_sitescriptdir}/eventlet-%{version}-py*.egg-info
182 %defattr(644,root,root,755)
183 %doc doc/_build/html/{_images,_static,modules,*.html,*.js}