From d803262b66cf86b27d96b1a2f227fc14ed4133c17a1702c0269ef1fe6abae551 Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 19 Apr 2017 18:36:40 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tornado?expand=0&rev=55 --- python-tornado.changes | 16 ++++++++ python-tornado.spec | 68 ++++++++++++++++++++------------ tornado-4.4.2.tar.gz | 3 -- tornado-4.4.3.tar.gz | 3 ++ tornado-async-deprecations.patch | 16 ++++++++ tornado-configtest.patch | 15 +++++++ 6 files changed, 92 insertions(+), 29 deletions(-) delete mode 100644 tornado-4.4.2.tar.gz create mode 100644 tornado-4.4.3.tar.gz create mode 100644 tornado-async-deprecations.patch create mode 100644 tornado-configtest.patch diff --git a/python-tornado.changes b/python-tornado.changes index 1d9a0fd..52f0c82 100644 --- a/python-tornado.changes +++ b/python-tornado.changes @@ -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 diff --git a/python-tornado.spec b/python-tornado.spec index e6d3698..648b349 100644 --- a/python-tornado.spec +++ b/python-tornado.spec @@ -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 diff --git a/tornado-4.4.2.tar.gz b/tornado-4.4.2.tar.gz deleted file mode 100644 index 24adc45..0000000 --- a/tornado-4.4.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2898f992f898cd41eeb8d53b6df75495f2f423b6672890aadaf196ea1448edcc -size 460193 diff --git a/tornado-4.4.3.tar.gz b/tornado-4.4.3.tar.gz new file mode 100644 index 0000000..f229e09 --- /dev/null +++ b/tornado-4.4.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f267acc96d5cf3df0fd8a7bfb5a91c2eb4ec81d5962d1a7386ceb34c655634a8 +size 463471 diff --git a/tornado-async-deprecations.patch b/tornado-async-deprecations.patch new file mode 100644 index 0000000..a95e3ac --- /dev/null +++ b/tornado-async-deprecations.patch @@ -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) + diff --git a/tornado-configtest.patch b/tornado-configtest.patch new file mode 100644 index 0000000..fc16269 --- /dev/null +++ b/tornado-configtest.patch @@ -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, "李康")