[arch-commits] Commit in python-tornado/trunk (2 files)
Felix Yan
fyan at archlinux.org
Thu Sep 11 07:08:27 UTC 2014
Date: Thursday, September 11, 2014 @ 09:08:27
Author: fyan
Revision: 118807
upgpkg: python-tornado 4.0.2-1
- upstream new release
- add a patch to use system ca-certificates (/etc/ssl/certs/ca-certificates.crt) instead of certifi
Added:
python-tornado/trunk/use_system_ca_certificates.patch
Modified:
python-tornado/trunk/PKGBUILD
----------------------------------+
PKGBUILD | 18 +++++++----
use_system_ca_certificates.patch | 57 +++++++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+), 7 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-09-11 05:37:10 UTC (rev 118806)
+++ PKGBUILD 2014-09-11 07:08:27 UTC (rev 118807)
@@ -3,18 +3,24 @@
# Contributor: Thomas Dziedzic < gostrc at gmail >
pkgname=('python-tornado' 'python2-tornado')
-pkgver=4.0.1
+pkgver=4.0.2
pkgrel=1
pkgdesc='open source version of the scalable, non-blocking web server and tools'
arch=('i686' 'x86_64')
url='http://www.tornadoweb.org/'
license=('Apache')
-makedepends=('python-setuptools' 'python2-setuptools' 'python2-backports.ssl_match_hostname' 'git' 'python-certifi' 'python2-certifi')
+makedepends=('python-setuptools' 'python2-setuptools' 'python2-backports.ssl_match_hostname' 'git')
checkdepends=('python-pycurl' 'python2-pycurl' 'python-mock' 'python2-mock' 'python-twisted' 'python2-twisted')
-source=("git+https://github.com/facebook/tornado.git#tag=v$pkgver")
-sha512sums=('SKIP')
+source=("git+https://github.com/facebook/tornado.git#tag=v$pkgver"
+ use_system_ca_certificates.patch)
+sha512sums=('SKIP'
+ '6e50e9ecf361d54d9f67e1f12185cf58863ad0eae72fbe7cc24e8eaf94874255009a030249bb51adf06e98c7ed0b17d8c6d9ee65190ebc341d6857c0efbc7840')
prepare() {
+ cd tornado
+ patch -p1 -i ../use_system_ca_certificates.patch
+
+ cd "$srcdir"
cp -a tornado{,-py2}
# python -> python2 rename
@@ -43,14 +49,12 @@
}
package_python-tornado() {
- depends=('python-certifi')
-
cd tornado
python setup.py install --root="${pkgdir}" --optimize=1
}
package_python2-tornado() {
- depends=('python2-certifi' 'python2-backports.ssl_match_hostname')
+ depends=('python2-backports.ssl_match_hostname')
cd tornado-py2
python2 setup.py install --root="${pkgdir}" --optimize=1
Added: use_system_ca_certificates.patch
===================================================================
--- use_system_ca_certificates.patch (rev 0)
+++ use_system_ca_certificates.patch 2014-09-11 07:08:27 UTC (rev 118807)
@@ -0,0 +1,57 @@
+diff --git a/setup.py b/setup.py
+index f09169f..d42c486 100644
+--- a/setup.py
++++ b/setup.py
+@@ -120,7 +120,7 @@ if (platform.python_implementation() == 'CPython' and
+
+ if setuptools is not None:
+ # If setuptools is not available, you're on your own for dependencies.
+- install_requires = ['certifi']
++ install_requires = []
+ if sys.version_info < (3, 2):
+ install_requires.append('backports.ssl_match_hostname')
+ kwargs['install_requires'] = install_requires
+diff --git a/tornado/simple_httpclient.py b/tornado/simple_httpclient.py
+index f0f73fa..ffe3e40 100644
+--- a/tornado/simple_httpclient.py
++++ b/tornado/simple_httpclient.py
+@@ -33,17 +33,9 @@ except ImportError:
+ # ssl is not available on Google App Engine.
+ ssl = None
+
+-try:
+- import certifi
+-except ImportError:
+- certifi = None
+-
+
+ def _default_ca_certs():
+- if certifi is None:
+- raise Exception("The 'certifi' package is required to use https "
+- "in simple_httpclient")
+- return certifi.where()
++ return "/etc/ssl/certs/ca-certificates.crt"
+
+
+ class SimpleAsyncHTTPClient(AsyncHTTPClient):
+diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py
+index 01b0d95..47a64e7 100644
+--- a/tornado/test/iostream_test.py
++++ b/tornado/test/iostream_test.py
+@@ -10,7 +10,6 @@ from tornado.stack_context import NullContext
+ from tornado.testing import AsyncHTTPTestCase, AsyncHTTPSTestCase, AsyncTestCase, bind_unused_port, ExpectLog, gen_test
+ from tornado.test.util import unittest, skipIfNonUnix
+ from tornado.web import RequestHandler, Application
+-import certifi
+ import errno
+ import logging
+ import os
+@@ -855,7 +854,7 @@ class TestIOStreamStartTLS(AsyncTestCase):
+ def test_handshake_fail(self):
+ 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/ssl/certs/ca-certificates.crt"))
+ with ExpectLog(gen_log, "SSL Error"):
+ with self.assertRaises(ssl.SSLError):
+ yield client_future
More information about the arch-commits
mailing list