New package: python-tornado-4.0.2

This commit is contained in:
Alessio Sergi 2014-10-31 20:00:00 +01:00
parent 75bad81424
commit 426a60fda9
3 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,57 @@
diff --git setup.py.orig setup.py
index f09169f..d42c486 100644
--- setup.py.orig
+++ 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 tornado/simple_httpclient.py.orig tornado/simple_httpclient.py
index f0f73fa..ffe3e40 100644
--- tornado/simple_httpclient.py.orig
+++ 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 tornado/test/iostream_test.py.orig tornado/test/iostream_test.py
index 01b0d95..47a64e7 100644
--- tornado/test/iostream_test.py.orig
+++ 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

View File

@ -0,0 +1,32 @@
# Template file for 'python-tornado'
pkgname=python-tornado
version=4.0.2
revision=1
wrksrc="tornado-${version}"
build_style=python-module
python_versions="2.7 3.4"
hostmakedepends="python-setuptools python3.4-setuptools"
makedepends="python-devel python3.4-devel"
depends="python-backports-ssl-match-hostname ca-certificates"
pycompile_module="tornado"
short_desc="Python2 web framework and asynchronous networking library"
maintainer="Alessio Sergi <al3hex@gmail.com>"
homepage="http://www.tornadoweb.org/"
license="Apache-2.0"
distfiles="${PYPI_SITE}/t/tornado/tornado-${version}.tar.gz"
checksum=900c5124ebdb6598ca8e8a0c5888f41a5f14117952d5515258e3d20222b21bfa
pre_build() {
# remove shebang
sed -i '/^#!\//,1d' tornado/*.py tornado/*/*.py
}
python3.4-tornado_package() {
depends="ca-certificates"
pycompile_version="3.4"
pycompile_module="tornado"
short_desc="${short_desc/Python2/Python3.4}"
pkg_install() {
vmove usr/lib/python3.4
}
}

1
srcpkgs/python3.4-tornado Symbolic link
View File

@ -0,0 +1 @@
python-tornado