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