1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Thomas Dziedzic < gostrc at gmail >
4 pkgname=python2-tornado
7 pkgdesc='open source version of the scalable, non-blocking web server and tools'
9 url='https://www.tornadoweb.org/'
11 depends=('python2-futures' 'python2-singledispatch' 'python2-backports-abc')
12 optdepends=('python2-monotonic: enable support for a monotonic clock'
13 'python2-pycurl: for tornado.curl_httpclient'
14 'python2-twisted: for tornado.platform.twisted')
15 # 'python2-pycares: an alternative non-blocking DNS resolver'
16 makedepends=('python2-setuptools')
17 checkdepends=('python2-pycurl' 'python2-mock' 'python2-twisted' 'python2-trollius'
19 source=("$pkgname-$pkgver.tar.gz::https://github.com/tornadoweb/tornado/archive/v$pkgver.tar.gz")
20 sha512sums=('b35fa0687ede6e672c35ca82fcc01dbb2ae9d8a7f2e4a65b6e07aa5a8eca861a22d775101172b7e33564951d193e5f11887021a3d762bee88668b9ac0069ab46')
22 export TORNADO_EXTENSION=1
25 # python -> python2 rename
26 find tornado-$pkgver -name '*py' -exec sed -e 's_#!/usr/bin/env python_&2_' -i {} \;
31 python2 setup.py build
35 # As of 4.5.3, ignoring test failures about resolving "localhost"
38 python2 setup.py install --root="$PWD/tmp_install" --optimize=1
39 export PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH"
41 python2 -m tornado.test.runtests
42 python2 -m tornado.test.runtests --ioloop=tornado.platform.select.SelectIOLoop
43 python2 -m tornado.test.runtests --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient
44 python2 -m tornado.test.runtests --ioloop_time_monotonic
45 python2 -m tornado.test.runtests --ioloop=tornado.platform.twisted.TwistedIOLoop
46 python2 -m tornado.test.runtests --ioloop=tornado.platform.asyncio.AsyncIOLoop
47 python2 -m tornado.test.runtests --resolver=tornado.netutil.ThreadedResolver
48 ) || echo "Tests failed"
53 python2 setup.py install --root="$pkgdir" --optimize=1