]> git.pld-linux.org Git - packages/python3-tornado.git/blob - python3-tornado.spec
6833056c3c7d46dad239430d388f912ffdcd3ebf
[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.0.4
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:  cf39425f3d7eba9a54287f3e795a2f23
17 URL:            http://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 # non-Linux
71 %{__rm} tornado/platform/windows.py
72
73 %build
74 TORNADO_EXTENSION=1 \
75 %py3_build
76
77 %if %{with tests}
78 cd build-3/lib*
79 %{__python3} -m tornado.test.runtests
80 cd ../..
81 %endif
82
83 %if %{with doc}
84 sphinx-build-3 -b html -n -d docs/build/doctrees docs docs/build/html
85 %endif
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 %py3_install
91 # just tornado tests with their data
92 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/tornado/test
93
94 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
95 cp -a demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %files
101 %defattr(644,root,root,755)
102 %doc README.rst
103 %dir %{py3_sitedir}/tornado
104 %attr(755,root,root) %{py3_sitedir}/tornado/speedups.cpython-*.so
105 %{py3_sitedir}/tornado/*.py
106 %{py3_sitedir}/tornado/py.typed
107 %{py3_sitedir}/tornado/platform
108 %{py3_sitedir}/tornado/__pycache__
109 %{py3_sitedir}/tornado-%{version}-py*.egg-info
110 %{_examplesdir}/%{name}-%{version}
111
112 %if %{with doc}
113 %files apidocs
114 %defattr(644,root,root,755)
115 %doc docs/build/html/{_images,_modules,_static,guide,releases,*.html,*.js}
116 %endif
This page took 0.094681 seconds and 2 git commands to generate.