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