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