[arch-commits] Commit in python-tornado/repos (8 files)
Felix Yan
fyan at archlinux.org
Sat Sep 19 13:19:39 UTC 2015
Date: Saturday, September 19, 2015 @ 15:19:38
Author: fyan
Revision: 140813
archrelease: copy trunk to community-staging-i686, community-staging-x86_64
Added:
python-tornado/repos/community-staging-i686/
python-tornado/repos/community-staging-i686/0001-use_system_ca_certificates.patch
(from rev 140812, python-tornado/trunk/0001-use_system_ca_certificates.patch)
python-tornado/repos/community-staging-i686/0002-get-rid-of-backports-ssl-match-hostname.patch
(from rev 140812, python-tornado/trunk/0002-get-rid-of-backports-ssl-match-hostname.patch)
python-tornado/repos/community-staging-i686/PKGBUILD
(from rev 140812, python-tornado/trunk/PKGBUILD)
python-tornado/repos/community-staging-x86_64/
python-tornado/repos/community-staging-x86_64/0001-use_system_ca_certificates.patch
(from rev 140812, python-tornado/trunk/0001-use_system_ca_certificates.patch)
python-tornado/repos/community-staging-x86_64/0002-get-rid-of-backports-ssl-match-hostname.patch
(from rev 140812, python-tornado/trunk/0002-get-rid-of-backports-ssl-match-hostname.patch)
python-tornado/repos/community-staging-x86_64/PKGBUILD
(from rev 140812, python-tornado/trunk/PKGBUILD)
-----------------------------------------------------------------------------+
community-staging-i686/0001-use_system_ca_certificates.patch | 36 ++++
community-staging-i686/0002-get-rid-of-backports-ssl-match-hostname.patch | 23 ++
community-staging-i686/PKGBUILD | 82 ++++++++++
community-staging-x86_64/0001-use_system_ca_certificates.patch | 36 ++++
community-staging-x86_64/0002-get-rid-of-backports-ssl-match-hostname.patch | 23 ++
community-staging-x86_64/PKGBUILD | 82 ++++++++++
6 files changed, 282 insertions(+)
Copied: python-tornado/repos/community-staging-i686/0001-use_system_ca_certificates.patch (from rev 140812, python-tornado/trunk/0001-use_system_ca_certificates.patch)
===================================================================
--- community-staging-i686/0001-use_system_ca_certificates.patch (rev 0)
+++ community-staging-i686/0001-use_system_ca_certificates.patch 2015-09-19 13:19:38 UTC (rev 140813)
@@ -0,0 +1,36 @@
+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
+ # Certifi is also optional on 2.7.9+, although making our dependencies
+ # conditional on micro version numbers seems like a bad idea
+ # until we have more declarative metadata.
+- install_requires.append('certifi')
++ pass
+ kwargs['install_requires'] = install_requires
+
+ setup(
+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):
Copied: python-tornado/repos/community-staging-i686/0002-get-rid-of-backports-ssl-match-hostname.patch (from rev 140812, python-tornado/trunk/0002-get-rid-of-backports-ssl-match-hostname.patch)
===================================================================
--- community-staging-i686/0002-get-rid-of-backports-ssl-match-hostname.patch (rev 0)
+++ community-staging-i686/0002-get-rid-of-backports-ssl-match-hostname.patch 2015-09-19 13:19:38 UTC (rev 140813)
@@ -0,0 +1,23 @@
+From f8f2ffca1928aeca2fa9771093436dba49baa538 Mon Sep 17 00:00:00 2001
+From: Felix Yan <felixonmars at gmail.com>
+Date: Fri, 12 Dec 2014 23:10:15 +0800
+Subject: [PATCH] Don't depend on backports.ssl-match-hostname with python
+ >=2.7.9, <3.0
+
+---
+ setup.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index f09169f..f795807 100644
+--- a/setup.py
++++ b/setup.py
+@@ -121,7 +121,7 @@ def build_extension(self, ext):
+ if setuptools is not None:
+ # If setuptools is not available, you're on your own for dependencies.
+ install_requires = []
+- if sys.version_info < (3, 2):
++ if sys.version_info < (2, 7, 9) or (3, 0) <= sys.version_info < (3, 2):
+ install_requires.append('backports.ssl_match_hostname')
+ kwargs['install_requires'] = install_requires
+
Copied: python-tornado/repos/community-staging-i686/PKGBUILD (from rev 140812, python-tornado/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD (rev 0)
+++ community-staging-i686/PKGBUILD 2015-09-19 13:19:38 UTC (rev 140813)
@@ -0,0 +1,82 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+
+pkgname=('python-tornado' 'python2-tornado')
+pkgver=4.2.1
+pkgrel=2
+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' 'git')
+checkdepends=('python-pycurl' 'python2-pycurl' 'python-mock' 'python2-mock' 'python-twisted' 'python2-twisted' 'python2-futures' 'python2-singledispatch')
+source=("git+https://github.com/facebook/tornado.git#tag=v$pkgver"
+ 0001-use_system_ca_certificates.patch
+ 0002-get-rid-of-backports-ssl-match-hostname.patch)
+sha512sums=('SKIP'
+ '7d484e811c7de62d2f2d38595abc5edf8f6cbdfc8a983229d4ad6b67cadf00f101acaee88bfa4337b14b5a234ebaacc72036ccafca3596eac5f64298a1e30d54'
+ '798f1c5f659138aa4d775edde7c962ec6410671f528b7ec44ca12ac342ddf9ec51d998c676b9025292a58c2140ba8492fcc76759b63adaf08320f96b11bcbfea')
+
+prepare() {
+ cd tornado
+ patch -p1 -i ../0001-use_system_ca_certificates.patch
+ patch -p1 -i ../0002-get-rid-of-backports-ssl-match-hostname.patch
+
+ cd "$srcdir"
+ cp -a tornado{,-py2}
+
+ # python -> python2 rename
+ find tornado-py2 -name '*py' -exec sed -e 's_#!/usr/bin/env python_&2_' -i {} \;
+}
+
+build() {
+ cd tornado
+ python setup.py build
+
+ cd ../tornado-py2
+ python2 setup.py build
+}
+
+check() {
+ (
+ cd tornado
+ # TODO: exporting PYTHONPATH didn't fix the tornado.speedups not found problem...
+ export PYTHONPATH="$(pwd)/build/lib.linux-$CARCH-3.4:$PYTHONPATH"
+ python -m tornado.test.runtests
+ python -m tornado.test.runtests --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient
+ # python -m tornado.test.runtests --resolver=tornado.platform.caresresolver.CaresResolver # pycares not in the repos
+ python -m tornado.test.runtests --resolver=tornado.netutil.ThreadedResolver
+ python -m tornado.test.runtests --ioloop=tornado.platform.asyncio.AsyncIOLoop
+ python -m tornado.test.runtests --ioloop=tornado.platform.select.SelectIOLoop
+ python -m tornado.test.runtests --ioloop=tornado.platform.twisted.TwistedIOLoop
+ python -m tornado.test.runtests --ioloop=tornado.test.twisted_test.LayeredTwistedIOLoop --resolver=tornado.platform.twisted.TwistedResolver
+ ) || warning "Python 3 tests failed"
+
+ (
+ cd tornado-py2
+ export PYTHONPATH="$(pwd)/build/lib.linux-$CARCH-2.7:$PYTHONPATH"
+ python2 -m tornado.test.runtests
+ python2 -m tornado.test.runtests --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient
+ # python2 -m tornado.test.runtests --resolver=tornado.platform.caresresolver.CaresResolver # pycares not in the repos
+ python2 -m tornado.test.runtests --resolver=tornado.netutil.ThreadedResolver
+ python2 -m tornado.test.runtests --ioloop=tornado.platform.select.SelectIOLoop
+ python2 -m tornado.test.runtests --ioloop=tornado.platform.twisted.TwistedIOLoop
+ python2 -m tornado.test.runtests --ioloop=tornado.test.twisted_test.LayeredTwistedIOLoop --resolver=tornado.platform.twisted.TwistedResolver
+ ) || warning "Python 2 tests failed"
+}
+
+package_python-tornado() {
+ depends=('python')
+
+ cd tornado
+ python setup.py install --root="${pkgdir}" --optimize=1
+}
+
+package_python2-tornado() {
+ depends=('python2>=2.7.9')
+
+ cd tornado-py2
+ python2 setup.py install --root="${pkgdir}" --optimize=1
+}
+
Copied: python-tornado/repos/community-staging-x86_64/0001-use_system_ca_certificates.patch (from rev 140812, python-tornado/trunk/0001-use_system_ca_certificates.patch)
===================================================================
--- community-staging-x86_64/0001-use_system_ca_certificates.patch (rev 0)
+++ community-staging-x86_64/0001-use_system_ca_certificates.patch 2015-09-19 13:19:38 UTC (rev 140813)
@@ -0,0 +1,36 @@
+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
+ # Certifi is also optional on 2.7.9+, although making our dependencies
+ # conditional on micro version numbers seems like a bad idea
+ # until we have more declarative metadata.
+- install_requires.append('certifi')
++ pass
+ kwargs['install_requires'] = install_requires
+
+ setup(
+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):
Copied: python-tornado/repos/community-staging-x86_64/0002-get-rid-of-backports-ssl-match-hostname.patch (from rev 140812, python-tornado/trunk/0002-get-rid-of-backports-ssl-match-hostname.patch)
===================================================================
--- community-staging-x86_64/0002-get-rid-of-backports-ssl-match-hostname.patch (rev 0)
+++ community-staging-x86_64/0002-get-rid-of-backports-ssl-match-hostname.patch 2015-09-19 13:19:38 UTC (rev 140813)
@@ -0,0 +1,23 @@
+From f8f2ffca1928aeca2fa9771093436dba49baa538 Mon Sep 17 00:00:00 2001
+From: Felix Yan <felixonmars at gmail.com>
+Date: Fri, 12 Dec 2014 23:10:15 +0800
+Subject: [PATCH] Don't depend on backports.ssl-match-hostname with python
+ >=2.7.9, <3.0
+
+---
+ setup.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index f09169f..f795807 100644
+--- a/setup.py
++++ b/setup.py
+@@ -121,7 +121,7 @@ def build_extension(self, ext):
+ if setuptools is not None:
+ # If setuptools is not available, you're on your own for dependencies.
+ install_requires = []
+- if sys.version_info < (3, 2):
++ if sys.version_info < (2, 7, 9) or (3, 0) <= sys.version_info < (3, 2):
+ install_requires.append('backports.ssl_match_hostname')
+ kwargs['install_requires'] = install_requires
+
Copied: python-tornado/repos/community-staging-x86_64/PKGBUILD (from rev 140812, python-tornado/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2015-09-19 13:19:38 UTC (rev 140813)
@@ -0,0 +1,82 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+
+pkgname=('python-tornado' 'python2-tornado')
+pkgver=4.2.1
+pkgrel=2
+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' 'git')
+checkdepends=('python-pycurl' 'python2-pycurl' 'python-mock' 'python2-mock' 'python-twisted' 'python2-twisted' 'python2-futures' 'python2-singledispatch')
+source=("git+https://github.com/facebook/tornado.git#tag=v$pkgver"
+ 0001-use_system_ca_certificates.patch
+ 0002-get-rid-of-backports-ssl-match-hostname.patch)
+sha512sums=('SKIP'
+ '7d484e811c7de62d2f2d38595abc5edf8f6cbdfc8a983229d4ad6b67cadf00f101acaee88bfa4337b14b5a234ebaacc72036ccafca3596eac5f64298a1e30d54'
+ '798f1c5f659138aa4d775edde7c962ec6410671f528b7ec44ca12ac342ddf9ec51d998c676b9025292a58c2140ba8492fcc76759b63adaf08320f96b11bcbfea')
+
+prepare() {
+ cd tornado
+ patch -p1 -i ../0001-use_system_ca_certificates.patch
+ patch -p1 -i ../0002-get-rid-of-backports-ssl-match-hostname.patch
+
+ cd "$srcdir"
+ cp -a tornado{,-py2}
+
+ # python -> python2 rename
+ find tornado-py2 -name '*py' -exec sed -e 's_#!/usr/bin/env python_&2_' -i {} \;
+}
+
+build() {
+ cd tornado
+ python setup.py build
+
+ cd ../tornado-py2
+ python2 setup.py build
+}
+
+check() {
+ (
+ cd tornado
+ # TODO: exporting PYTHONPATH didn't fix the tornado.speedups not found problem...
+ export PYTHONPATH="$(pwd)/build/lib.linux-$CARCH-3.4:$PYTHONPATH"
+ python -m tornado.test.runtests
+ python -m tornado.test.runtests --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient
+ # python -m tornado.test.runtests --resolver=tornado.platform.caresresolver.CaresResolver # pycares not in the repos
+ python -m tornado.test.runtests --resolver=tornado.netutil.ThreadedResolver
+ python -m tornado.test.runtests --ioloop=tornado.platform.asyncio.AsyncIOLoop
+ python -m tornado.test.runtests --ioloop=tornado.platform.select.SelectIOLoop
+ python -m tornado.test.runtests --ioloop=tornado.platform.twisted.TwistedIOLoop
+ python -m tornado.test.runtests --ioloop=tornado.test.twisted_test.LayeredTwistedIOLoop --resolver=tornado.platform.twisted.TwistedResolver
+ ) || warning "Python 3 tests failed"
+
+ (
+ cd tornado-py2
+ export PYTHONPATH="$(pwd)/build/lib.linux-$CARCH-2.7:$PYTHONPATH"
+ python2 -m tornado.test.runtests
+ python2 -m tornado.test.runtests --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient
+ # python2 -m tornado.test.runtests --resolver=tornado.platform.caresresolver.CaresResolver # pycares not in the repos
+ python2 -m tornado.test.runtests --resolver=tornado.netutil.ThreadedResolver
+ python2 -m tornado.test.runtests --ioloop=tornado.platform.select.SelectIOLoop
+ python2 -m tornado.test.runtests --ioloop=tornado.platform.twisted.TwistedIOLoop
+ python2 -m tornado.test.runtests --ioloop=tornado.test.twisted_test.LayeredTwistedIOLoop --resolver=tornado.platform.twisted.TwistedResolver
+ ) || warning "Python 2 tests failed"
+}
+
+package_python-tornado() {
+ depends=('python')
+
+ cd tornado
+ python setup.py install --root="${pkgdir}" --optimize=1
+}
+
+package_python2-tornado() {
+ depends=('python2>=2.7.9')
+
+ cd tornado-py2
+ python2 setup.py install --root="${pkgdir}" --optimize=1
+}
+
More information about the arch-commits
mailing list