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