14
0

Accepting request 486650 from devel:languages:python

1

OBS-URL: https://build.opensuse.org/request/show/486650
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-tornado?expand=0&rev=37
This commit is contained in:
2017-04-28 08:36:31 +00:00
committed by Git OBS Bridge
6 changed files with 92 additions and 29 deletions

View File

@@ -1,3 +1,19 @@
-------------------------------------------------------------------
Fri Apr 7 19:59:28 UTC 2017 - toddrme2178@gmail.com
- update to 4.4.3
* The `tornado.auth` module has been updated for compatibility with `a
change to Facebook's access_token endpoint.
-------------------------------------------------------------------
Thu Apr 6 15:30:33 UTC 2017 - jmatejek@suse.com
- tornado-configtest.patch: fix test failure when __file__ is not absolute
- tornado-async-deprecations.patch: filter test failures due to async
deprecation warnings, to fix build on python 3.6
- update for multipython build
- enable test suite
-------------------------------------------------------------------
Mon Nov 14 14:39:26 UTC 2016 - dmueller@suse.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-tornado
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 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,27 +16,29 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-tornado
Version: 4.4.2
Version: 4.4.3
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://pypi.io/packages/source/t/tornado/tornado-%{version}.tar.gz
Source: https://files.pythonhosted.org/packages/source/t/tornado/tornado-%{version}.tar.gz
Patch0: tornado-configtest.patch
Patch1: tornado-async-deprecations.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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_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
BuildRequires: python-futures
BuildRequires: python-pycurl
BuildRequires: python-setuptools
BuildRequires: python-simplejson
BuildRequires: python-rpm-macros
# Tornado requires python-certifi when the ssl module
# does not provide the 'create_default_context' function.
@@ -49,25 +51,33 @@ BuildRequires: python-simplejson
%if 0%{?sles_version} >= 12 || 0%{?suse_version} > 1320
Requires: python >= 2.7.9
%else
BuildRequires: python-certifi
BuildRequires: %{python_module certifi}
BuildRequires: python-backports.ssl_match_hostname
Requires: python-backports.ssl_match_hostname
Requires: python-certifi
%endif
%if %python_version_nodots < 35
Requires: python-backports_abc
Requires: python-simplejson
%endif
# Python 2 specific backports
%ifpython2
Requires: python-singledispatch
%if 0%{?suse_version}
Recommends: python-futures
%endif
# end python 2 specific
Requires: python-simplejson
Recommends: python-pycares
Recommends: python-pycurl
Recommends: python-Twisted
Recommends: python-service_identity
%endif
BuildRequires: fdupes
%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)}
%python_subpackages
%description
Tornado is an open source version of the scalable, non-blocking web server and
@@ -89,15 +99,21 @@ 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 setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes demos
%python_install
%fdupes -s demos
%fdupes %{buildroot}%{_prefix}
%files
%check
%python_exec -m tornado.test.runtests
%files %{python_files}
%defattr(-,root,root,-)
%doc demos
%{python_sitearch}/tornado

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2898f992f898cd41eeb8d53b6df75495f2f423b6672890aadaf196ea1448edcc
size 460193

3
tornado-4.4.3.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f267acc96d5cf3df0fd8a7bfb5a91c2eb4ec81d5962d1a7386ceb34c655634a8
size 463471

View File

@@ -0,0 +1,16 @@
Index: tornado-4.4.2/tornado/test/runtests.py
===================================================================
--- tornado-4.4.2.orig/tornado/test/runtests.py
+++ tornado-4.4.2/tornado/test/runtests.py
@@ -125,6 +125,11 @@ def main():
# Silence the warning until we can drop 3.5.[01].
warnings.filterwarnings("ignore", category=PendingDeprecationWarning,
message=".*legacy __aiter__ protocol")
+ warnings.filterwarnings("ignore", category=DeprecationWarning,
+ message=".*legacy __aiter__ protocol")
+ # simply ignore all async-related deprecations, for a rough support for python 3.6
+ warnings.filterwarnings("ignore", category=DeprecationWarning,
+ message="async")
logging.getLogger("tornado.access").setLevel(logging.CRITICAL)

15
tornado-configtest.patch Normal file
View File

@@ -0,0 +1,15 @@
Index: tornado-4.4.2/tornado/test/options_test.py
===================================================================
--- tornado-4.4.2.orig/tornado/test/options_test.py
+++ tornado-4.4.2/tornado/test/options_test.py
@@ -36,8 +36,8 @@ class OptionsTest(unittest.TestCase):
options.define("port", default=80)
options.define("username", default='foo')
options.define("my_path")
- config_path = os.path.join(os.path.dirname(__file__),
- "options_test.cfg")
+ config_path = os.path.abspath(os.path.join(os.path.dirname(__file__),
+ "options_test.cfg"))
options.parse_config_file(config_path)
self.assertEqual(options.port, 443)
self.assertEqual(options.username, "李康")