]> git.pld-linux.org Git - packages/python-tornado.git/blob - python-tornado.spec
- release 3 (by relup.sh)
[packages/python-tornado.git] / python-tornado.spec
1 # NOTE: for versions >= 6 (for python 3.5+) see python3-tornado.spec
2 #
3 # Conditional build:
4 %bcond_without  doc     # Sphinx documentation
5 %bcond_with     tests   # tornado tests [use network]
6 %bcond_without  python2 # CPython 2.x module
7 %bcond_with     python3 # CPython 3.x module
8
9 %define         module  tornado
10 Summary:        Web framework and asynchronous networking library
11 Summary(pl.UTF-8):      Szkielet WWW i asynchroniczna biblioteka sieciowa
12 Name:           python-%{module}
13 # keep 5.x here for python2 support
14 Version:        5.1.1
15 Release:        3
16 License:        Apache v2.0
17 Group:          Libraries/Python
18 #Source0Download: https://pypi.org/simple/tornado/
19 Source0:        https://files.pythonhosted.org/packages/source/t/tornado/%{module}-%{version}.tar.gz
20 # Source0-md5:  a1ce4f392d30ff0ebcb255150d89b826
21 #Source0:       https://github.com/tornadoweb/tornado/archive/v%{version}.tar.gz
22 URL:            http://www.tornadoweb.org/
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.714
25 BuildRequires:  sed >= 4.0
26 %if %{with python2}
27 BuildRequires:  python-devel >= 1:2.7.9
28 BuildRequires:  python-modules >= 1:2.7.9
29 BuildRequires:  python-setuptools
30 %if %{with tests}
31 BuildRequires:  python-backports-ssl_match_hostname
32 BuildRequires:  python-backports_abc >= 0.4
33 BuildRequires:  python-certifi
34 BuildRequires:  python-futures
35 BuildRequires:  python-singledispatch
36 # SO_REUSEPORT option
37 BuildRequires:  uname(release) >= 3.9
38 %endif
39 %endif
40 %if %{with python3}
41 BuildRequires:  python3-devel >= 1:3.4
42 BuildRequires:  python3-modules >= 1:3.4
43 BuildRequires:  python3-setuptools
44 %if %{with tests}
45 %if "%{py3_ver}" < "3.5"
46 BuildRequires:  python3-backports_abc >= 0.4
47 %endif
48 %if "%{py3_ver}" < "3.4"
49 BuildRequires:  python3-singledispatch
50 %endif
51 # SO_REUSEPORT option
52 BuildRequires:  uname(release) >= 3.9
53 %endif
54 %endif
55 %if %{with doc}
56 BuildRequires:  sphinx-pdg
57 %endif
58 Requires:       python-modules >= 1:2.7.9
59 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61 %description
62 Tornado is a Python web framework and asynchronous networking library,
63 originally developed at FriendFeed. By using non-blocking network I/O,
64 Tornado can scale to tens of thousands of open connections, making it
65 ideal for long polling, WebSockets, and other applications that
66 require a long-lived connection to each user.
67
68 %description -l pl.UTF-8
69 Tornado to szkielet WWW oraz asynchroniczna biblioteka sieciowa dla
70 Pythona, oryginalnie powstałe w FriendFeed. Dzięki użyciu
71 nieblokującego sieciowego we/wy, Tornado może się skalować do
72 dziesiątek tysięcy otwartych połączeń, co czyni go idealnym do
73 zastosowań z długim pobieraniem, WebSockets i innych wymagających
74 długotrwałego połączenia z każdym użytkownikiem.
75
76 %package -n python3-tornado
77 Summary:        Web framework and asynchronous networking library
78 Summary(pl.UTF-8):      Szkielet WWW i asynchroniczna biblioteka sieciowa
79 Group:          Libraries/Python
80 Requires:       python3-modules >= 1:3.4
81
82 %description -n python3-tornado
83 Tornado is a Python web framework and asynchronous networking library,
84 originally developed at FriendFeed. By using non-blocking network I/O,
85 Tornado can scale to tens of thousands of open connections, making it
86 ideal for long polling, WebSockets, and other applications that
87 require a long-lived connection to each user.
88
89 %description -n python3-tornado -l pl.UTF-8
90 Tornado to szkielet WWW oraz asynchroniczna biblioteka sieciowa dla
91 Pythona, oryginalnie powstałe w FriendFeed. Dzięki użyciu
92 nieblokującego sieciowego we/wy, Tornado może się skalować do
93 dziesiątek tysięcy otwartych połączeń, co czyni go idealnym do
94 zastosowań z długim pobieraniem, WebSockets i innych wymagających
95 długotrwałego połączenia z każdym użytkownikiem.
96
97 %package apidocs
98 Summary:        API documentation for Python tornado module
99 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona tornado
100 Group:          Documentation
101
102 %description apidocs
103 API documentation for Python tornado module.
104
105 %description apidocs -l pl.UTF-8
106 Dokumentacja API modułu Pythona tornado.
107
108 %prep
109 %setup -q -n %{module}-%{version}
110
111 # non-Linux
112 %{__rm} tornado/platform/{kqueue,windows}.py
113
114 %build
115 %if %{with python2}
116 TORNADO_EXTENSION=1 \
117 %py_build
118
119 %if %{with tests}
120 cd build-2/lib*
121 %{__python} -m tornado.test.runtests
122 cd ../..
123 %endif
124 %endif
125
126 %if %{with python3}
127 TORNADO_EXTENSION=1 \
128 %py3_build
129
130 %if %{with tests}
131 cd build-3/lib*
132 %{__python3} -m tornado.test.runtests
133 cd ../..
134 %endif
135 %endif
136
137 %if %{with doc}
138 # drop -W from sphinx options to allow build without optional imports (e.g. twisted)
139 %{__make} -C docs sphinx \
140         SPHINXOPTS="-n -d build/doctrees ."
141 %endif
142
143 %install
144 rm -rf $RPM_BUILD_ROOT
145
146 %if %{with python2}
147 %py_install
148
149 %py_postclean
150 # just tornado tests with their data
151 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/tornado/test
152 %endif
153
154 %if %{with python3}
155 %py3_install
156 # just tornado tests with their data
157 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/tornado/test
158 %endif
159
160 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
161 cp -a demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
162
163 %clean
164 rm -rf $RPM_BUILD_ROOT
165
166 %files
167 %defattr(644,root,root,755)
168 %doc README.rst
169 %dir %{py_sitedir}/tornado
170 %attr(755,root,root) %{py_sitedir}/tornado/speedups.so
171 %{py_sitedir}/tornado/*.py[co]
172 %{py_sitedir}/tornado/platform
173 %{py_sitedir}/tornado-%{version}-py*.egg-info
174 %{_examplesdir}/%{name}-%{version}
175
176 %if %{with python3}
177 %files -n python3-%{module}
178 %defattr(644,root,root,755)
179 %doc README.rst
180 %dir %{py3_sitedir}/tornado
181 %attr(755,root,root) %{py3_sitedir}/tornado/speedups.cpython-*.so
182 %{py3_sitedir}/tornado/*.py
183 %{py3_sitedir}/tornado/platform
184 %{py3_sitedir}/tornado/__pycache__
185 %{py3_sitedir}/tornado-%{version}-py*.egg-info
186 %endif
187
188 %if %{with doc}
189 %files apidocs
190 %defattr(644,root,root,755)
191 %doc docs/build/html/*
192 %endif
This page took 0.076502 seconds and 3 git commands to generate.