14
0
Todd R
2017-04-19 18:35:30 +00:00
committed by Git OBS Bridge
parent 49f03f55b8
commit f87f8fa1c7
6 changed files with 30 additions and 93 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-tornado
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,29 +16,27 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-tornado
Version: 4.4.3
Version: 4.4.2
Release: 0
Url: http://www.tornadoweb.org
Summary: Open source version of scalable, non-blocking web server that power FriendFeed
License: Apache-2.0
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/t/tornado/tornado-%{version}.tar.gz
Patch0: tornado-configtest.patch
Patch1: tornado-async-deprecations.patch
Source: https://pypi.io/packages/source/t/tornado/tornado-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pycurl}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module simplejson}
# SECTION test requirements
BuildRequires: %{python_module backports_abc}
BuildRequires: python-singledispatch
# /SECTION
BuildRequires: fdupes
%if 0%{?rhel} >= 7
BuildRequires: python-backports-ssl_match_hostname
Requires: python-backports-ssl_match_hostname
%else
BuildRequires: python-backports.ssl_match_hostname
Requires: python-backports.ssl_match_hostname
%endif
BuildRequires: python-devel
BuildRequires: python-futures
BuildRequires: python-rpm-macros
BuildRequires: python-pycurl
BuildRequires: python-setuptools
BuildRequires: python-simplejson
# Tornado requires python-certifi when the ssl module
# does not provide the 'create_default_context' function.
@@ -51,33 +49,25 @@ BuildRequires: python-rpm-macros
%if 0%{?sles_version} >= 12 || 0%{?suse_version} > 1320
Requires: python >= 2.7.9
%else
BuildRequires: %{python_module certifi}
BuildRequires: python-backports.ssl_match_hostname
Requires: python-backports.ssl_match_hostname
BuildRequires: python-certifi
Requires: python-certifi
%endif
%if %python_version_nodots < 35
Requires: python-backports_abc
%endif
# Python 2 specific backports
%ifpython2
Requires: python-singledispatch
Recommends: python-futures
%endif
# end python 2 specific
Requires: python-simplejson
Requires: python-singledispatch
%if 0%{?suse_version}
Recommends: python-futures
Recommends: python-pycares
Recommends: python-pycurl
Recommends: python-Twisted
Recommends: python-service_identity
%endif
BuildRequires: fdupes
%python_subpackages
%if 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);")}
%endif
%{!?py_ver: %global py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)}
%description
Tornado is an open source version of the scalable, non-blocking web server and
@@ -99,21 +89,15 @@ thousands of clients, see The C10K problem.)
%setup -q -n tornado-%{version}
# Fix non-executable script rpmlint issue:
find demos tornado -name "*.py" -exec sed -i "/#\!\/usr\/bin\/.*/d" {} \;
%patch0 -p1
%patch1 -p1
%build
%python_build
python setup.py build
%install
%python_install
%fdupes -s demos
%fdupes %{buildroot}%{_prefix}
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes demos
%check
%python_exec -m tornado.test.runtests
%files %{python_files}
%files
%defattr(-,root,root,-)
%doc demos
%{python_sitearch}/tornado