]>
Commit | Line | Data |
---|---|---|
d2431ecf JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Sphinx documentation | |
4 | %bcond_with tests # test target [few tests fail as of 0.18.4] | |
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 | |
11 | Version: 0.18.4 | |
2aaf4ecd | 12 | Release: 3 |
d2431ecf JB |
13 | License: MIT |
14 | Group: Development/Languages/Python | |
15 | #Source0Download: https://pypi.python.org/simple/eventlet/ | |
16 | Source0: https://pypi.python.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz | |
17 | # Source0-md5: 8d1c646d8cc10a4958c92fe8a30f3676 | |
18 | URL: https://pypi.python.org/pypi/eventlet/ | |
19 | BuildRequires: rpm-pythonprov | |
20 | BuildRequires: rpmbuild(macros) >= 1.714 | |
21 | %if %{with python2} | |
22 | BuildRequires: python-devel >= 1:2.6 | |
23 | BuildRequires: python-setuptools >= 5.4.1 | |
24 | %if %{with tests} | |
25 | BuildRequires: python-dns >= 1.10 | |
26 | BuildRequires: python-greenlet >= 0.3 | |
27 | BuildRequires: python-nose >= 1.3.1 | |
28 | BuildRequires: python-pyOpenSSL | |
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} | |
35 | BuildRequires: python3-dns >= 1.10 | |
36 | BuildRequires: python3-greenlet >= 0.3 | |
37 | BuildRequires: python3-nose >= 1.3.1 | |
38 | BuildRequires: python3-pyOpenSSL | |
39 | %endif | |
40 | %endif | |
41 | %{?with_doc:BuildRequires: sphinx-pdg} | |
42 | Requires: python-dns >= 1.10 | |
43 | Requires: python-greenlet >= 0.3 | |
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 | |
73 | Requires: python3-dns >= 1.10 | |
74 | Requires: python3-greenlet >= 0.3 | |
75 | Requires: python3-modules >= 1:3.3 | |
76 | ||
77 | %description -n python3-eventlet | |
78 | Eventlet is a concurrent networking library for Python that allows you | |
79 | to change how you run your code, not how you write it. | |
80 | ||
81 | It uses epoll or libevent for highly scalable non-blocking I/O. | |
82 | Coroutines ensure that the developer uses a blocking style of | |
83 | programming that is similar to threading, but provide the benefits of | |
84 | non-blocking I/O. The event dispatch is implicit, which means you can | |
85 | easily use Eventlet from the Python interpreter, or as a small part of | |
86 | a larger application. | |
87 | ||
88 | %description -n python3-eventlet -l pl.UTF-8 | |
89 | Eventlet to równoległa biblioteka sieciowa dla Ptyhona, pozwalająca na | |
90 | zmianę sposobu uruchamiania kodu bez sposobu pisania go. | |
91 | ||
92 | Biblioteka wykorzystuje epoll lub libevent do wysoko skalowalnych, | |
93 | nieblokujących operacji we/wy. Korutyny zapewniają, że programista | |
94 | korzysta z blokującego stylu programowania, podobnego do wątkowego, | |
95 | ale mającego zalety nieblokującego we/wy. Przekazywania zdarzeń jest | |
96 | domyślne, co oznacza, że można łatwo używać modułu Eventlet z poziomu | |
97 | interpretera Pythona lub jako małej części dużej aplikacji. | |
98 | ||
99 | %package apidocs | |
100 | Summary: API documentation for eventlet module | |
101 | Summary(pl.UTF-8): Dokumentacja API modułu eventlet | |
102 | Group: Documentation | |
9566f295 ER |
103 | %if "%{_rpmversion}" >= "5" |
104 | BuildArch: noarch | |
105 | %endif | |
d2431ecf JB |
106 | |
107 | %description apidocs | |
108 | API documentation for eventlet module. | |
109 | ||
110 | %description apidocs -l pl.UTF-8 | |
111 | Dokumentacja API modułu eventlet. | |
112 | ||
113 | %prep | |
114 | %setup -q -n eventlet-%{version} | |
115 | ||
116 | %build | |
117 | %if %{with python2} | |
118 | %py_build %{?with_tests:test} | |
119 | %endif | |
120 | ||
121 | %if %{with python3} | |
122 | %py3_build %{?with_tests:test} | |
123 | %endif | |
124 | ||
125 | %if %{with doc} | |
126 | %{__make} -C doc -j1 html | |
127 | %{__rm} -r doc/_build/html/_sources | |
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 | |
141 | %endif | |
142 | ||
143 | %clean | |
144 | rm -rf $RPM_BUILD_ROOT | |
145 | ||
146 | %if %{with python2} | |
147 | %files | |
148 | %defattr(644,root,root,755) | |
149 | %doc AUTHORS LICENSE NEWS README.rst | |
150 | %{py_sitescriptdir}/eventlet | |
151 | %{py_sitescriptdir}/eventlet-%{version}-py*.egg-info | |
152 | %endif | |
153 | ||
154 | %if %{with python3} | |
155 | %files -n python3-eventlet | |
156 | %defattr(644,root,root,755) | |
157 | %doc AUTHORS LICENSE NEWS README.rst | |
158 | %{py3_sitescriptdir}/eventlet | |
159 | %{py3_sitescriptdir}/eventlet-%{version}-py*.egg-info | |
160 | %endif | |
161 | ||
162 | %if %{with doc} | |
163 | %files apidocs | |
164 | %defattr(644,root,root,755) | |
165 | %doc doc/_build/html/* | |
166 | %endif |