]> git.pld-linux.org Git - packages/python-eventlet.git/blame_incremental - python-eventlet.spec
- adjusted enum34 dependency removal for older setuptools
[packages/python-eventlet.git] / python-eventlet.spec
... / ...
CommitLineData
1# TODO: fix tests
2#
3# Conditional build:
4%bcond_without doc # Sphinx documentation
5%bcond_with tests # unit tests (some failures as of 0.23.0)
6%bcond_without python2 # CPython 2.x module
7%bcond_without python3 # CPython 3.x module
8
9Summary: Highly concurrent networking library for Python 2
10Summary(pl.UTF-8): Biblioteka sieciowa o dużym stopniu zrównoleglenia dla Pythona 2
11Name: python-eventlet
12Version: 0.23.0
13Release: 2
14License: MIT
15Group: Development/Languages/Python
16#Source0Download: https://pypi.org/simple/eventlet/
17Source0: https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
18# Source0-md5: 9b459a4d3b1365febd0d22cf71b9e7ce
19URL: https://pypi.org/project/eventlet/
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22BuildRequires: sed >= 4.0
23%if %{with python2}
24BuildRequires: python-devel >= 1:2.6
25BuildRequires: python-setuptools >= 5.4.1
26%if %{with tests}
27BuildRequires: python-enum34
28BuildRequires: python-greenlet >= 0.3
29BuildRequires: python-nose >= 1.3.1
30%endif
31%endif
32%if %{with python3}
33BuildRequires: python3-devel >= 1:3.3
34BuildRequires: python3-setuptools >= 5.4.1
35%if %{with tests}
36%if "%{py3_ver}" < "3.4"
37BuildRequires: python3-enum34
38%endif
39BuildRequires: python3-greenlet >= 0.3
40BuildRequires: python3-nose >= 1.3.1
41%endif
42%endif
43%{?with_doc:BuildRequires: sphinx-pdg}
44Requires: python-modules >= 1:2.6
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
48Eventlet is a concurrent networking library for Python that allows you
49to change how you run your code, not how you write it.
50
51It uses epoll or libevent for highly scalable non-blocking I/O.
52Coroutines ensure that the developer uses a blocking style of
53programming that is similar to threading, but provide the benefits of
54non-blocking I/O. The event dispatch is implicit, which means you can
55easily use Eventlet from the Python interpreter, or as a small part of
56a larger application.
57
58%description -l pl.UTF-8
59Eventlet to równoległa biblioteka sieciowa dla Ptyhona, pozwalająca na
60zmianę sposobu uruchamiania kodu bez sposobu pisania go.
61
62Biblioteka wykorzystuje epoll lub libevent do wysoko skalowalnych,
63nieblokujących operacji we/wy. Korutyny zapewniają, że programista
64korzysta z blokującego stylu programowania, podobnego do wątkowego,
65ale mającego zalety nieblokującego we/wy. Przekazywania zdarzeń jest
66domyślne, co oznacza, że można łatwo używać modułu Eventlet z poziomu
67interpretera Pythona lub jako małej części dużej aplikacji.
68
69%package -n python3-eventlet
70Summary: Highly concurrent networking library for Python 3
71Summary(pl.UTF-8): Biblioteka sieciowa o dużym stopniu zrównoleglenia dla Pythona 3
72Group: Development/Languages/Python
73Requires: python3-modules >= 1:3.3
74
75%description -n python3-eventlet
76Eventlet is a concurrent networking library for Python that allows you
77to change how you run your code, not how you write it.
78
79It uses epoll or libevent for highly scalable non-blocking I/O.
80Coroutines ensure that the developer uses a blocking style of
81programming that is similar to threading, but provide the benefits of
82non-blocking I/O. The event dispatch is implicit, which means you can
83easily use Eventlet from the Python interpreter, or as a small part of
84a larger application.
85
86%description -n python3-eventlet -l pl.UTF-8
87Eventlet to równoległa biblioteka sieciowa dla Ptyhona, pozwalająca na
88zmianę sposobu uruchamiania kodu bez sposobu pisania go.
89
90Biblioteka wykorzystuje epoll lub libevent do wysoko skalowalnych,
91nieblokujących operacji we/wy. Korutyny zapewniają, że programista
92korzysta z blokującego stylu programowania, podobnego do wątkowego,
93ale mającego zalety nieblokującego we/wy. Przekazywania zdarzeń jest
94domyślne, co oznacza, że można łatwo używać modułu Eventlet z poziomu
95interpretera Pythona lub jako małej części dużej aplikacji.
96
97%package apidocs
98Summary: API documentation for eventlet module
99Summary(pl.UTF-8): Dokumentacja API modułu eventlet
100Group: Documentation
101%if "%{_rpmversion}" >= "5"
102BuildArch: noarch
103%endif
104
105%description apidocs
106API documentation for eventlet module.
107
108%description apidocs -l pl.UTF-8
109Dokumentacja API modułu eventlet.
110
111%prep
112%setup -q -n eventlet-%{version}
113
114%build
115%if %{with python2}
116%py_build
117
118%if %{with tests}
119PYTHONPATH=$(pwd) \
120nosetests-%{py_ver} tests
121%edif
122%endif
123
124%if %{with python3}
125%py3_build
126
127%if %{with tests}
128PYTHONPATH=$(pwd) \
129nosetests-%{py3_ver} tests
130%edif
131%endif
132
133%if %{with doc}
134PYTHONPATH=$(pwd) \
135%{__make} -C doc -j1 html
136%endif
137
138%install
139rm -rf $RPM_BUILD_ROOT
140
141%if %{with python2}
142%py_install
143
144%py_postclean
145%endif
146
147%if %{with python3}
148%py3_install
149
150%if "%{py3_ver}" >= "3.4"
151# don't require enum34 on python >= 3.4 (different forms depending on setuptools version)
152%{__sed} -i -e '/^\[:python_version *< *"3\.4"]/,$ d' \
153 -e '/^enum34;python_version<"3\.4"/d' $RPM_BUILD_ROOT%{py3_sitescriptdir}/eventlet-%{version}-py*.egg-info/requires.txt
154%endif
155%endif
156
157%clean
158rm -rf $RPM_BUILD_ROOT
159
160%if %{with python2}
161%files
162%defattr(644,root,root,755)
163%doc AUTHORS LICENSE NEWS README.rst
164%{py_sitescriptdir}/eventlet
165%{py_sitescriptdir}/eventlet-%{version}-py*.egg-info
166%endif
167
168%if %{with python3}
169%files -n python3-eventlet
170%defattr(644,root,root,755)
171%doc AUTHORS LICENSE NEWS README.rst
172%{py3_sitescriptdir}/eventlet
173%{py3_sitescriptdir}/eventlet-%{version}-py*.egg-info
174%endif
175
176%if %{with doc}
177%files apidocs
178%defattr(644,root,root,755)
179%doc doc/_build/html/{_images,_static,modules,*.html,*.js}
180%endif
This page took 0.047968 seconds and 4 git commands to generate.