]> git.pld-linux.org Git - packages/python3-tornado.git/blob - python3-tornado.spec
c98f85fb4ca22bdff994ad8d5e94ae485eb04ffb
[packages/python3-tornado.git] / python3-tornado.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_with     tests   # tornado tests [use network]
5
6 %define         module  tornado
7 Summary:        Web framework and asynchronous networking library
8 Summary(pl.UTF-8):      Szkielet WWW i asynchroniczna biblioteka sieciowa
9 Name:           python3-tornado
10 Version:        6.1
11 Release:        3
12 License:        Apache v2.0
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/tornado/
15 Source0:        https://files.pythonhosted.org/packages/source/t/tornado/tornado-%{version}.tar.gz
16 # Source0-md5:  f324f5e7607798552359d6ab054c4321
17 URL:            https://www.tornadoweb.org/
18 %if %{with python3}
19 BuildRequires:  python3-devel >= 1:3.5
20 BuildRequires:  python3-modules >= 1:3.5
21 BuildRequires:  python3-setuptools
22 %if %{with tests}
23 # SO_REUSEPORT option
24 BuildRequires:  uname(release) >= 3.9
25 BuildRequires:  python3-twisted
26 %endif
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.714
30 BuildRequires:  sed >= 4.0
31 %if %{with doc}
32 BuildRequires:  python3-sphinxcontrib-asyncio
33 BuildRequires:  python3-sphinx_rtd_theme
34 BuildRequires:  python3-twisted
35 BuildRequires:  sphinx-pdg-3
36 %endif
37 Requires:       python3-modules >= 1:3.5
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 Tornado is a Python web framework and asynchronous networking library,
42 originally developed at FriendFeed. By using non-blocking network I/O,
43 Tornado can scale to tens of thousands of open connections, making it
44 ideal for long polling, WebSockets, and other applications that
45 require a long-lived connection to each user.
46
47 %description -l pl.UTF-8
48 Tornado to szkielet WWW oraz asynchroniczna biblioteka sieciowa dla
49 Pythona, oryginalnie powstałe w FriendFeed. Dzięki użyciu
50 nieblokującego sieciowego we/wy, Tornado może się skalować do
51 dziesiątek tysięcy otwartych połączeń, co czyni go idealnym do
52 zastosowań z długim pobieraniem, WebSockets i innych wymagających
53 długotrwałego połączenia z każdym użytkownikiem.
54
55 %package apidocs
56 Summary:        API documentation for Python tornado module
57 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona tornado
58 Group:          Documentation
59 BuildArch:      noarch
60
61 %description apidocs
62 API documentation for Python tornado module.
63
64 %description apidocs -l pl.UTF-8
65 Dokumentacja API modułu Pythona tornado.
66
67 %prep
68 %setup -q -n tornado-%{version}
69
70 %{__sed} -i -e '1s,/usr/bin/env python3\?,%{__python3},' demos/*/*.py
71
72 %build
73 TORNADO_EXTENSION=1 \
74 %py3_build
75
76 %if %{with tests}
77 cd build-3/lib*
78 %{__python3} -m tornado.test.runtests
79 cd ../..
80 %endif
81
82 %if %{with doc}
83 sphinx-build-3 -b html -n -d docs/build/doctrees docs docs/build/html
84 %endif
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88
89 %py3_install
90 # just tornado tests with their data
91 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/tornado/test
92
93 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
94 cp -a demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %files
100 %defattr(644,root,root,755)
101 %doc README.rst
102 %dir %{py3_sitedir}/tornado
103 %attr(755,root,root) %{py3_sitedir}/tornado/speedups.cpython-*.so
104 %{py3_sitedir}/tornado/*.py
105 %{py3_sitedir}/tornado/py.typed
106 %{py3_sitedir}/tornado/platform
107 %{py3_sitedir}/tornado/__pycache__
108 %{py3_sitedir}/tornado-%{version}-py*.egg-info
109 %{_examplesdir}/%{name}-%{version}
110
111 %if %{with doc}
112 %files apidocs
113 %defattr(644,root,root,755)
114 %doc docs/build/html/{_images,_modules,_static,guide,releases,*.html,*.js}
115 %endif
This page took 0.065618 seconds and 2 git commands to generate.