From b29ffdb10c91489e5d0c59a47cd88cae6e966c7e Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 18 Sep 2015 16:16:50 -0600 Subject: [PATCH] Update to 4.2.1 - Modernize spec --- .gitignore | 1 + python-tornado-cert.patch | 28 +++-------------- python-tornado.spec | 63 +++++++++++++-------------------------- sources | 2 +- 4 files changed, 26 insertions(+), 68 deletions(-) diff --git a/.gitignore b/.gitignore index 7028cc6..44471ef 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ tornado-1.0.1.tar.gz /tornado-2.2.1.tar.gz /tornado-3.2.1.tar.gz /tornado-4.1.tar.gz +/tornado-4.2.1.tar.gz diff --git a/python-tornado-cert.patch b/python-tornado-cert.patch index ed5ff24..fb26ea2 100644 --- a/python-tornado-cert.patch +++ b/python-tornado-cert.patch @@ -1,7 +1,7 @@ -diff -up ./tornado/simple_httpclient.py.cert ./tornado/simple_httpclient.py ---- ./tornado/simple_httpclient.py.cert 2015-03-02 19:26:31.840455222 -0700 -+++ ./tornado/simple_httpclient.py 2015-03-02 19:27:44.833403497 -0700 -@@ -32,17 +32,8 @@ except ImportError: +diff -up tornado-4.2.1/tornado/simple_httpclient.py.cert tornado-4.2.1/tornado/simple_httpclient.py +--- tornado-4.2.1/tornado/simple_httpclient.py.cert 2015-07-17 09:31:29.000000000 -0600 ++++ tornado-4.2.1/tornado/simple_httpclient.py 2015-09-18 16:10:15.293077440 -0600 +@@ -33,17 +33,8 @@ except ImportError: # ssl is not available on Google App Engine. ssl = None @@ -20,23 +20,3 @@ diff -up ./tornado/simple_httpclient.py.cert ./tornado/simple_httpclient.py class SimpleAsyncHTTPClient(AsyncHTTPClient): -diff -up ./tornado/test/iostream_test.py.cert ./tornado/test/iostream_test.py ---- ./tornado/test/iostream_test.py.cert 2015-03-02 19:26:31.889456050 -0700 -+++ ./tornado/test/iostream_test.py 2015-03-02 19:28:00.791674739 -0700 -@@ -10,7 +10,6 @@ from tornado.stack_context import NullCo - from tornado.testing import AsyncHTTPTestCase, AsyncHTTPSTestCase, AsyncTestCase, bind_unused_port, ExpectLog, gen_test - from tornado.test.util import unittest, skipIfNonUnix, refusing_port - from tornado.web import RequestHandler, Application --import certifi - import errno - import logging - import os -@@ -877,7 +876,7 @@ class TestIOStreamStartTLS(AsyncTestCase - def test_handshake_fail(self): - server_future = self.server_start_tls(_server_ssl_options()) - client_future = self.client_start_tls( -- dict(cert_reqs=ssl.CERT_REQUIRED, ca_certs=certifi.where())) -+ dict(cert_reqs=ssl.CERT_REQUIRED, ca_certs='/etc/pki/tls/cert.pem')) - with ExpectLog(gen_log, "SSL Error"): - with self.assertRaises(ssl.SSLError): - yield client_future diff --git a/python-tornado.spec b/python-tornado.spec index e420e9b..c67a9e6 100644 --- a/python-tornado.spec +++ b/python-tornado.spec @@ -5,8 +5,8 @@ %global pkgname tornado Name: python-%{pkgname} -Version: 4.1 -Release: 3%{?dist} +Version: 4.2.1 +Release: 1%{?dist} Summary: Scalable, non-blocking web server and tools Group: Development/Libraries @@ -71,81 +71,58 @@ server and and tools. This package contains some example applications. %endif # with_python3 %prep -%setup -qc -mv %{pkgname}-%{version} python2 -pushd python2 +%setup -q -n %{pkgname}-%{version} %patch0 -p1 -b .cert # remove shebang from files %{__sed} -i.orig -e '/^#!\//, 1d' *py tornado/*.py tornado/*/*.py -popd - -%if 0%{?with_python3} -cp -a python2 python3 -find python3 -name '*.py' | xargs sed -i '1s|^#!.*python|#!%{__python3}|' -%endif # with_python3 %build %if 0%{?with_python3} -pushd python3 - %{__python3} setup.py build -popd +%py3_build %endif # with_python3 - -pushd python2 - %{__python2} setup.py build -popd +%py2_build %install %if 0%{?with_python3} -pushd python3 - PATH=$PATH:%{buildroot}%{python3_sitearch}/%{pkgname} - %{__python3} setup.py install --root=%{buildroot} -popd +%py3_install %endif # with_python3 - -pushd python2 - PATH=$PATH:%{buildroot}%{python2_sitearch}/%{pkgname} - %{__python2} setup.py install --root=%{buildroot} -popd +%py2_install %check -%if "%{dist}" != ".el6" - %if 0%{?with_python3} - pushd python3 - PYTHONPATH=%{python3_sitearch} \ - %{__python3} -m tornado.test.runtests --verbose - popd - %endif # with_python3 - pushd python2 - PYTHONPATH=%{python2_sitearch} \ - %{__python2} -m tornado.test.runtests --verbose - popd -%endif +%if 0%{?with_python3} +PYTHONPATH=%{python3_sitearch} %{__python3} -m tornado.test.runtests --verbose +%endif # with_python3 +PYTHONPATH=%{python2_sitearch} %{__python2} -m tornado.test.runtests --verbose + %files -%doc python2/README.rst python2/PKG-INFO +%doc README.rst %{python2_sitearch}/%{pkgname}/ %{python2_sitearch}/%{pkgname}-%{version}-*.egg-info %files doc -%doc python2/demos +%doc demos %if 0%{?with_python3} %files -n python3-tornado -%doc python3/README.rst python3/PKG-INFO +%doc README.rst %{python3_sitearch}/%{pkgname}/ %{python3_sitearch}/%{pkgname}-%{version}-*.egg-info %files -n python3-tornado-doc -%doc python3/demos +%doc demos %endif %changelog +* Fri Sep 19 2015 Orion Poplawski - 4.2.1-1 +- Update to 4.2.1 +- Modernize spec + * Fri Jul 10 2015 Orion Poplawski - 4.1-3 - Do not require python-backports-ssl_match_hostname for F22+ (bug #1231368) diff --git a/sources b/sources index 24c63fa..b95e4c1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a06ea343375f2247344257ef691641f9 tornado-4.1.tar.gz +d523204389cfb70121bb69709f551b20 tornado-4.2.1.tar.gz