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