-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-tornado.spec
More file actions
104 lines (92 loc) · 3.15 KB
/
python-tornado.spec
File metadata and controls
104 lines (92 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
%define module tornado
# disable tests on abf, some require remote access
# tests complete in local build
%bcond test 0
# disabled doc generation due to building issue
# left it behind the conditional for a revisit
%bcond docs 0
Name: python-tornado
Version: 6.5.5
Release: 1
Summary: Scalable, non-blocking web server and tools
Group: Development/Python
License: Apache-2.0
URL: https://www.tornadoweb.org
Source0: https://files.pythonhosted.org/packages/source/t/%{module}/%{module}-%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}.rpmlintrc
BuildSystem: python
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(python)
BuildRequires: python%{pyver}dist(pip)
BuildRequires: python%{pyver}dist(setuptools)
BuildRequires: python%{pyver}dist(pycurl)
BuildRequires: python%{pyver}dist(wheel)
%if %{with docs}
BuildRequires: python%{pyver}dist(sphinx)
BuildRequires: python%{pyver}dist(sphinx-rtd-theme)
BuildRequires: python%{pyver}dist(sphinxcontrib-applehelp)
BuildRequires: python%{pyver}dist(sphinxcontrib-asyncio)
BuildRequires: python%{pyver}dist(sphinxcontrib-devhelp)
BuildRequires: python%{pyver}dist(sphinxcontrib-htmlhelp)
BuildRequires: python%{pyver}dist(sphinxcontrib-jquery)
BuildRequires: python%{pyver}dist(sphinxcontrib-jsmath)
BuildRequires: python%{pyver}dist(sphinxcontrib-qthelp)
BuildRequires: python%{pyver}dist(sphinxcontrib-serializinghtml)
BuildRequires: python%{pyver}dist(docutils)
BuildRequires: python%{pyver}dist(imagesize)
BuildRequires: python%{pyver}dist(jinja2)
BuildRequires: python%{pyver}dist(pygments)
BuildRequires: python%{pyver}dist(requests)
BuildRequires: python%{pyver}dist(snowballstemmer)
%endif
%description
Tornado is an open source version of the scalable, non-blocking web server and
and tools.
The framework is distinct from most mainstream web server frameworks (and
certainly most Python frameworks) because it is non-blocking and reasonably
fast. Because it is non-blocking and uses epoll, it can handle thousands of
simultaneous standing connections, which means it is ideal for real-time web
services.
%if %{with docs}
%package doc
Summary: Examples for python-tornado
Group: Development/Python
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
Tornado is an open source version of the scalable, non-blocking web server and
and tools. This package contains some example applications.
%endif
%prep -a
# Remove bundled egg-info
rm -rf %{module}.egg-info
%build -p
export LDFLAGS="%{ldflags} -lpython%{pyver}"
%build -a
%if %{with docs}
cd docs
sphinx-build -q -E -n -W -b html . build/html
%endif
%if %{with test}
%check
# Skip the same timing-related tests that upstream skips when run in Travis CI.
# https://github.com/tornadoweb/tornado/commit/abc5780a06a1edd0177a399a4dd4f39497cb0c57
export TRAVIS=true
# Increase timeout for tests on riscv64
%ifarch riscv64
export ASYNC_TEST_TIMEOUT=80
%else
export ASYNC_TEST_TIMEOUT=30
%endif
%{__python} -m tornado.test.runtests --verbose --fail-if-logs=false
%endif
%files
%{python_sitearch}/%{module}
%{python_sitearch}/%{module}-%{version}.dist-info
%doc README.rst
%license LICENSE
%if %{with docs}
%files doc
%doc docs
%endif