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