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