1 |
%define oname tornado |
%define oname tornado |
|
%define subrel 1 |
|
2 |
|
|
3 |
Name: python-%{oname} |
Name: python-%{oname} |
4 |
Version: 2.3 |
Version: 3.1 |
5 |
Release: %mkrel 2 |
Release: %mkrel 1 |
6 |
Summary: Scalable, non-blocking web server and tools |
Summary: Scalable, non-blocking web server and tools |
7 |
|
|
8 |
Group: Development/Python |
Group: Development/Python |
9 |
License: ASL 2.0 |
License: ASL 2.0 |
10 |
URL: http://www.tornadoweb.org |
URL: http://www.tornadoweb.org |
11 |
Source0: http://github.com/downloads/facebook/tornado/%{oname}-%{version}.tar.gz |
Source0: https://pypi.python.org/packages/source/t/%{oname}/%{oname}-%{version}.tar.gz |
|
Patch0: cve-2013-2099-fix-ssl-match_hostname-dos.patch |
|
12 |
BuildArch: noarch |
BuildArch: noarch |
13 |
BuildRequires: python-devel |
BuildRequires: pkgconfig(python) |
|
Requires: python |
|
14 |
Requires: python-pycurl |
Requires: python-pycurl |
15 |
Requires: python-simplejson |
Requires: python-simplejson |
16 |
|
BuildRequires: python-tools |
17 |
|
BuildRequires: python-setuptools |
18 |
|
BuildRequires: python3-setuptools |
19 |
|
BuildRequires: pkgconfig(python3) |
20 |
|
|
21 |
%description |
%description |
22 |
Tornado is an open source version of the scalable, non-blocking web server and |
Tornado is an open source version of the scalable, non-blocking web server and |
37 |
Tornado is an open source version of the scalable, non-blocking web server and |
Tornado is an open source version of the scalable, non-blocking web server and |
38 |
and tools. This package contains some example applications. |
and tools. This package contains some example applications. |
39 |
|
|
40 |
|
%package -n python3-tornado |
41 |
|
Summary: Scalable, non-blocking web server and tools |
42 |
|
Group: Development/Python |
43 |
|
|
44 |
|
%description -n python3-tornado |
45 |
|
Tornado is an open source version of the scalable, non-blocking web |
46 |
|
server and tools. |
47 |
|
|
48 |
|
The framework is distinct from most mainstream web server frameworks |
49 |
|
(and certainly most Python frameworks) because it is non-blocking and |
50 |
|
reasonably fast. Because it is non-blocking and uses epoll, it can |
51 |
|
handle thousands of simultaneous standing connections, which means it is |
52 |
|
ideal for real-time web services. |
53 |
|
|
54 |
|
%package -n python3-tornado-doc |
55 |
|
Summary: Examples for python-tornado |
56 |
|
Group: Development/Python |
57 |
|
Requires: python3-tornado = %{version}-%{release} |
58 |
|
|
59 |
|
%description -n python3-tornado-doc |
60 |
|
Tornado is an open source version of the scalable, non-blocking web |
61 |
|
server and and tools. This package contains some example applications. |
62 |
|
|
63 |
%prep |
%prep |
64 |
%setup -q -n %{oname}-%{version} |
%setup -q -n %{oname}-%{version} |
65 |
%patch0 -p1 |
|
66 |
|
# remove shebang from files |
67 |
|
%{__sed} -i.orig -e '/^#!\//, 1d' *py tornado/*.py tornado/*/*.py |
68 |
|
|
69 |
# spurious permission fix |
# spurious permission fix |
70 |
find demos/ -name "*.py" -exec chmod -x {} \; |
find demos/ -name "*.py" -exec chmod -x {} \; |
72 |
# remove empty file |
# remove empty file |
73 |
rm -rf demos/facebook/static/facebook.js |
rm -rf demos/facebook/static/facebook.js |
74 |
|
|
75 |
|
rm -rf %{py3dir} |
76 |
|
cp -a . %{py3dir} |
77 |
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' |
78 |
|
|
79 |
|
|
80 |
%build |
%build |
81 |
%__python setup.py build |
pushd %{py3dir} |
82 |
|
%{__python3} setup.py build |
83 |
|
popd |
84 |
|
|
85 |
%install |
%{__python} setup.py build |
|
%__rm -rf %{buildroot} |
|
|
PYTHONDONTWRITEBYTECODE= %__python setup.py install --root=%{buildroot} |
|
86 |
|
|
87 |
%clean |
%install |
88 |
%__rm -rf %{buildroot} |
pushd %{py3dir} |
89 |
|
PATH=$PATH:%{buildroot}%{python3_sitelib}/%{oname} |
90 |
|
%{__python3} setup.py install --skip-build --root=%{buildroot} |
91 |
|
popd |
92 |
|
|
93 |
|
PATH=$PATH:%{buildroot}%{python_sitelib}/%{oname} |
94 |
|
%{__python} setup.py install --skip-build --root=%{buildroot} |
95 |
|
|
96 |
|
%check |
97 |
|
%{__python} -m unittest discover -s tornado/test -p *test.py || : |
98 |
|
|
99 |
|
pushd %{py3dir} |
100 |
|
%{__python3} -m unittest discover -s tornado/test -p *test.py || : |
101 |
|
popd |
102 |
|
|
103 |
%files |
%files |
104 |
%defattr(-,root,root,-) |
%doc README.rst PKG-INFO |
|
%doc README |
|
105 |
%{python_sitelib}/%{oname}/ |
%{python_sitelib}/%{oname}/ |
106 |
%{python_sitelib}/%{oname}-%{version}-py%{py_ver}.egg-info/ |
%{python_sitelib}/%{oname}-%{version}-py%{py_ver}.egg-info/ |
107 |
|
|
108 |
%files doc |
%files doc |
109 |
%defattr(-,root,root,-) |
%defattr(-,root,root,-) |
110 |
%doc demos |
%doc demos |
111 |
|
|
112 |
|
%files -n python3-tornado |
113 |
|
%doc README.rst PKG-INFO |
114 |
|
%{python3_sitelib}/%{oname}/ |
115 |
|
%{python3_sitelib}/%{oname}-%{version}-*.egg-info |
116 |
|
|
117 |
|
%files -n python3-tornado-doc |
118 |
|
%doc demos |
119 |
|
|