pyzmq: fork including www-servers/tornado to restore python 2.7 support for urh

This commit is contained in:
Rick Farina (Zero_Chaos) 2020-04-21 16:03:47 -04:00
parent c139f801cd
commit 76fddf829c
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC
13 changed files with 636 additions and 0 deletions

View file

@ -0,0 +1,2 @@
DIST pyzmq-17.1.0.tar.gz 1082716 BLAKE2B eed059cad8cc37e9315d16a43768f531ada1274b46bdf91d2ebe83cd0b4c269ea99a8532e3db6d0ea68be31600cf7d29ea4c4e894aa6d04c61534b11fb816d54 SHA512 7f1975c4d02e7d47577049da8df84753905d01672d5a244cef2e5b05e0b6fdb22e88cbb36f2e59831e95a8224819183d9a82baf1f9d7f599da61bcbfe2fc23d3
DIST pyzmq-19.0.0.tar.gz 1150320 BLAKE2B a2af57b1cb809ab72aff1bbee17a7fff5eeeff90805884542579c7cb58c235f8b257a8724c64f55cc8e8eda4a943ec2f54490d546a74bc1532557c46b420e6d2 SHA512 06a395fee62c78f806c43b07362fe2d4b7ac05813d75d4b983f8eefffbe0ca36f64db1591ead719b2866fcfe0867c919033eca0063ca32529e649cd9790461b1

View file

@ -0,0 +1,22 @@
Disable hanging test
Bug: https://github.com/zeromq/pyzmq/issues/1202
Patch by Marius Brehler <marbre@linux.sungazer.de>
--- pyzmq-17.1.0/zmq/tests/test_message.py
+++ pyzmq-17.1.0/zmq/tests/test_message.py
@@ -14,6 +14,7 @@ import time
from pprint import pprint
from unittest import TestCase
+import pytest
import zmq
from zmq.tests import BaseZMQTestCase, SkipTest, skip_pypy, PYPY
from zmq.utils.strtypes import unicode, bytes, b, u
@@ -262,6 +263,7 @@ class TestFrame(BaseZMQTestCase):
self.assertEqual(s,r)
self.assertEqual(s, m.bytes)
+ @pytest.mark.skip("test sometimes hangs")
def test_buffer_numpy(self):
"""test non-copying numpy array messages"""
try:

View file

@ -0,0 +1,186 @@
diff --git a/zmq/tests/test_auth.py b/zmq/tests/test_auth.py
index 003f171..9d882b6 100644
--- a/zmq/tests/test_auth.py
+++ b/zmq/tests/test_auth.py
@@ -191,6 +191,7 @@ class TestThreadAuthentication(BaseAuthTestCase):
client.close()
server.close()
+ @pytest.mark.skip("sometimes hangs")
def test_curve(self):
"""threaded auth - CURVE"""
self.auth.allow('127.0.0.1')
@@ -309,6 +310,7 @@ class TestThreadAuthentication(BaseAuthTestCase):
@skip_pypy
+ @pytest.mark.skip("fails with cffi")
def test_curve_user_id(self):
"""threaded auth - CURVE"""
self.auth.allow('127.0.0.1')
diff --git a/zmq/tests/test_constants.py b/zmq/tests/test_constants.py
index 6b4d0c9..d527b06 100644
--- a/zmq/tests/test_constants.py
+++ b/zmq/tests/test_constants.py
@@ -91,6 +91,7 @@ class TestConstants(TestCase):
self.fail("Shouldn't have: zmq.%s=%s" % (name, value))
@pytest.mark.skipif(not zmq.DRAFT_API, reason="Only test draft API if built with draft API")
+ @pytest.mark.skip("fails with cffi")
def test_draft(self):
zmq_version = zmq.zmq_version_info()
for version, new_names in constant_names.draft_in.items():
diff --git a/zmq/tests/test_draft.py b/zmq/tests/test_draft.py
index 5bb9e29..934ed50 100644
--- a/zmq/tests/test_draft.py
+++ b/zmq/tests/test_draft.py
@@ -20,6 +20,7 @@ class TestDraftSockets(BaseZMQTestCase):
super(TestDraftSockets, self).setUp()
+ @pytest.mark.skip("fails with cffi")
def test_client_server(self):
client, server = self.create_bound_pair(zmq.CLIENT, zmq.SERVER)
client.send(b'request')
@@ -29,6 +30,7 @@ class TestDraftSockets(BaseZMQTestCase):
reply = self.recv(client)
assert reply == b'reply'
+ @pytest.mark.skip("fails with cffi")
def test_radio_dish(self):
dish, radio = self.create_bound_pair(zmq.DISH, zmq.RADIO)
dish.rcvtimeo = 250
diff --git a/zmq/tests/test_message.py b/zmq/tests/test_message.py
index d3a6aa8..9ce622c 100644
--- a/zmq/tests/test_message.py
+++ b/zmq/tests/test_message.py
@@ -18,6 +18,7 @@ import zmq
from zmq.tests import BaseZMQTestCase, SkipTest, skip_pypy, PYPY
from zmq.utils.strtypes import unicode, bytes, b, u
+import pytest
# some useful constants:
@@ -71,7 +72,7 @@ class TestFrame(BaseZMQTestCase):
m = zmq.Frame(s)
b = m.bytes
self.assertEqual(s, m.bytes)
- if not PYPY:
+ if not PYPY and False:
# check that it copies
self.assert_(b is not s)
# check that it copies only once
@@ -94,6 +95,7 @@ class TestFrame(BaseZMQTestCase):
self.assertEqual(len(s), len(m))
@skip_pypy
+ @pytest.mark.skip("seems to be broken")
def test_lifecycle1(self):
"""Run through a ref counting cycle with a copy."""
for i in range(5, 16): # 32, 64,..., 65536
@@ -130,6 +132,7 @@ class TestFrame(BaseZMQTestCase):
del s
@skip_pypy
+ @pytest.mark.skip("seems to be broken")
def test_lifecycle2(self):
"""Run through a different ref counting cycle with a copy."""
for i in range(5, 16): # 32, 64,..., 65536
@@ -166,6 +169,7 @@ class TestFrame(BaseZMQTestCase):
del s
@skip_pypy
+ @pytest.mark.skip("fails with cffi")
def test_tracker(self):
m = zmq.Frame(b'asdf', copy=False, track=True)
self.assertFalse(m.tracker.done)
@@ -186,6 +190,7 @@ class TestFrame(BaseZMQTestCase):
self.assertRaises(ValueError, zmq.MessageTracker, m)
@skip_pypy
+ @pytest.mark.skip("fails with cffi")
def test_multi_tracker(self):
m = zmq.Frame(b'asdf', copy=False, track=True)
m2 = zmq.Frame(b'whoda', copy=False, track=True)
@@ -222,6 +227,7 @@ class TestFrame(BaseZMQTestCase):
self.assert_(m.buffer is m.buffer)
@skip_pypy
+ @pytest.mark.skip("fails with cffi")
def test_memoryview_shape(self):
"""memoryview shape info"""
if sys.version_info < (3,):
@@ -331,6 +337,7 @@ class TestFrame(BaseZMQTestCase):
B = numpy.frombuffer(msg, A.dtype).reshape(A.shape)
assert_array_equal(A, B)
+ @pytest.mark.skip("fails with cffi")
def test_frame_more(self):
"""test Frame.more attribute"""
frame = zmq.Frame(b"hello")
diff --git a/zmq/tests/test_security.py b/zmq/tests/test_security.py
index b73234d..8fdea48 100644
--- a/zmq/tests/test_security.py
+++ b/zmq/tests/test_security.py
@@ -9,6 +9,8 @@ import contextlib
import time
from threading import Thread
+import pytest
+
import zmq
from zmq.tests import (
BaseZMQTestCase, SkipTest, PYPY
@@ -114,6 +116,7 @@ class TestSecurity(BaseZMQTestCase):
client.connect("%s:%i" % (iface, port))
self.bounce(server, client, False)
+ @pytest.mark.skip("fails with cffi")
def test_plain(self):
"""test PLAIN authentication"""
server = self.socket(zmq.DEALER)
@@ -201,6 +204,7 @@ class TestSecurity(BaseZMQTestCase):
# verify that it is equal to the known public key
self.assertEqual(derived_public, public)
+ @pytest.mark.skip("fails with cffi")
def test_curve(self):
"""test CURVE encryption"""
server = self.socket(zmq.DEALER)
diff --git a/zmq/tests/test_socket.py b/zmq/tests/test_socket.py
index 3046663..dcc66d0 100644
--- a/zmq/tests/test_socket.py
+++ b/zmq/tests/test_socket.py
@@ -221,6 +221,7 @@ class TestSocket(BaseZMQTestCase):
self.assertEqual(rcvd, [b'b'])
@skip_pypy
+ @pytest.mark.skip("test hangs")
def test_tracker(self):
"test the MessageTracker object for tracking when zmq is done with a buffer"
addr = 'tcp://127.0.0.1'
@@ -363,6 +364,7 @@ class TestSocket(BaseZMQTestCase):
s.close()
self.assertTrue(s.closed)
+ @pytest.mark.skip("fails with cffi")
def test_poll(self):
a,b = self.create_bound_pair()
tic = time.time()
@@ -502,6 +504,7 @@ class TestSocket(BaseZMQTestCase):
self.assertEqual(events, [])
# Travis can't handle how much memory PyPy uses on this test
+ @pytest.mark.skip("test hangs")
@mark.skipif(
(
pypy and on_travis
@@ -536,6 +539,7 @@ class TestSocket(BaseZMQTestCase):
assert view[0] == byte
assert view[-1] == byte
+ @pytest.mark.skip("fails with cffi")
def test_custom_serialize(self):
a, b = self.create_bound_pair(zmq.DEALER, zmq.ROUTER)
def serialize(msg):

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<upstream>
<remote-id type="pypi">pyzmq</remote-id>
</upstream>
<use>
<flag name="draft">Enable draft API support</flag>
</use>
</pkgmetadata>

View file

@ -0,0 +1,67 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_{6,7} )
PYTHON_REQ_USE="threads(+)"
inherit flag-o-matic distutils-r1 toolchain-funcs
DESCRIPTION="Lightweight and super-fast messaging library built on top of the ZeroMQ library"
HOMEPAGE="https://www.zeromq.org/bindings:python https://pypi.org/project/pyzmq/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="doc test"
RESTRICT="!test? ( test )"
RDEPEND="
>=net-libs/zeromq-4.2.2-r2:=[drafts]
dev-python/py[${PYTHON_USEDEP}]
dev-python/cffi:=[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
dev-python/cython[${PYTHON_USEDEP}]
test? (
dev-python/pytest[${PYTHON_USEDEP}]
>=www-servers/tornado-5.0.2[${PYTHON_USEDEP}]
)
doc? (
>=dev-python/sphinx-1.3[${PYTHON_USEDEP}]
dev-python/numpydoc[${PYTHON_USEDEP}]
)"
PATCHES=( "${FILESDIR}"/${P}-test_message.patch )
python_prepare_all() {
# Prevent un-needed download during build
sed -e "/'sphinx.ext.intersphinx',/d" -i docs/source/conf.py || die
distutils-r1_python_prepare_all
}
python_configure_all() {
tc-export CC
append-cppflags -DZMQ_BUILD_DRAFT_API=1
}
python_compile_all() {
use doc && emake -C docs html
}
python_compile() {
esetup.py cython --force
python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
distutils-r1_python_compile
}
python_test() {
${EPYTHON} -m pytest -v "${BUILD_DIR}/lib" || die
}
python_install_all() {
use doc && local HTML_DOCS=( docs/build/html/. )
distutils-r1_python_install_all
}

View file

@ -0,0 +1,61 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
PYTHON_REQ_USE="threads(+)"
inherit flag-o-matic distutils-r1 toolchain-funcs
DESCRIPTION="Lightweight and super-fast messaging library built on top of the ZeroMQ library"
HOMEPAGE="https://www.zeromq.org/bindings:python https://pypi.org/project/pyzmq/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="LGPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="doc +draft test"
RESTRICT="!test? ( test )"
RDEPEND="
>=net-libs/zeromq-4.2.2-r2:=[drafts]
dev-python/py[${PYTHON_USEDEP}]
dev-python/cffi:=[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
dev-python/cython[${PYTHON_USEDEP}]
test? (
>=www-servers/tornado-5.0.2[${PYTHON_USEDEP}]
)
doc? (
>=dev-python/sphinx-1.3[${PYTHON_USEDEP}]
dev-python/numpydoc[${PYTHON_USEDEP}]
)"
PATCHES=(
"${FILESDIR}/pyzmq-19.0.0-tests.patch"
)
distutils_enable_tests pytest
distutils_enable_sphinx docs \
"dev-python/numpydoc"
python_prepare_all() {
# Prevent un-needed download during build
sed -e "/'sphinx.ext.intersphinx',/d" -i docs/source/conf.py || die
# some tests fail with cffi backend
rm zmq/tests/asyncio/test_asyncio.py || die
distutils-r1_python_prepare_all
}
python_configure_all() {
tc-export CC
append-cppflags -DZMQ_BUILD_DRAFT_API=$(usex draft '1' '0')
}
python_compile() {
esetup.py cython --force
distutils-r1_python_compile
}

View file

@ -0,0 +1,4 @@
DIST tornado-4.5.3.tar.gz 484221 BLAKE2B 7b3682fa85a7f6ad32351d40993516a3e397b7b0a5de9d807bcd8b2b21325a6170f3670cb13e12aa208b6590313cf165ddf40537dba1fee61fa9d71954265a66 SHA512 c17dd7a3b541c26950d27c8a399ae4fdff1d99d16ff0c5de9871fe2de4c0f797c96712b23b5ed5efdaee06bb251f7def114c83fe6f7f37f344cdac9996d14448
DIST tornado-5.1.tar.gz 516359 BLAKE2B 1ff6e6ced124b7b0df0e476eac555de20e4ac86f01369ee484e33bf5d749c269a81dd11a0b4c8b3169db6fd9f7a1b4e3c3551d46474c53a1fed8e342660c57f9 SHA512 8f45e5bbee5453a4225f05840a9fa80dd574c5a9cac9ec4d787f11c3f86f347c66d39c984a8bbe96dbb41f599e25102f1a3dad1c55b479bebee7d856aaca764a
DIST tornado-6.0.3.tar.gz 482444 BLAKE2B 1dda4baae52034d779879fef507d5764894f4aa054e60b00a2f8a989df4b31b495cbed6397d602e7c19844ea1538988558d5741da91646b64b6dbb8e78d618ed SHA512 2db182da7327fdd32fe76a50726a1285332139972766368c3b3dac5b4d54b4bd452a76062c09d1d158a97ace78b7915d93a29a7a8138499a2e56aee9df461abc
DIST tornado-6.0.4.tar.gz 496204 BLAKE2B 6c092214d03baf5cf7615b780043e2fa40a4ed623b7ca59a2528cc3625ba904b21ef93c528278adedaf83e3b6e5a6311d867833dfe9826637e97918dee6fa334 SHA512 d29d69cf40f8b34fb2c55d81b6ecd9bc7c6fdf644eb4ff35452829510c0d5ec185da0a6067fec3e8afb2bedf9f5f08b06adb0ad53dcab04cb791a75abc304d6e

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<upstream>
<remote-id type="pypi">tornado</remote-id>
<remote-id type="github">tornadoweb/tornado</remote-id>
</upstream>
</pkgmetadata>

View file

@ -0,0 +1,54 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_6 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="Python web framework and asynchronous networking library"
HOMEPAGE="http://www.tornadoweb.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="examples test"
RESTRICT="!test? ( test )"
CDEPEND="
dev-python/certifi[${PYTHON_USEDEP}]
>=dev-python/pycurl-7.19.3.1[${PYTHON_USEDEP}]
>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
${CDEPEND}
dev-python/mock[${PYTHON_USEDEP}]
)
"
RDEPEND="${CDEPEND}"
distutils_enable_sphinx docs \
dev-python/sphinx_rtd_theme
# doc without intersphinx does not build (asyncio error)
#PATCHES=(
# "${FILESDIR}"/4.5.1-drop-intersphinx.patch
#)
python_test() {
"${PYTHON}" -m tornado.test.runtests || die "tests failed under ${EPYTHON}"
}
python_install_all() {
if use examples; then
insinto /usr/share/doc/${PF}/examples
doins -r demos/.
docompress -x /usr/share/doc/${PF}/examples
fi
distutils-r1_python_install_all
}

View file

@ -0,0 +1,55 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="Python web framework and asynchronous networking library"
HOMEPAGE="http://www.tornadoweb.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
IUSE="examples test"
RESTRICT="!test? ( test )"
CDEPEND="
>=dev-python/pycurl-7.19.3.1[${PYTHON_USEDEP}]
>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
${CDEPEND}
dev-python/mock[${PYTHON_USEDEP}]
)
"
RDEPEND="${CDEPEND}"
distutils_enable_sphinx docs \
dev-python/sphinx_rtd_theme
# doc without intersphinx does not build (asyncio error)
#PATCHES=(
# "${FILESDIR}"/4.5.1-drop-intersphinx.patch
#)
python_test() {
local -x ASYNC_TEST_TIMEOUT=60
"${PYTHON}" -m tornado.test.runtests --verbose ||
die "tests failed under ${EPYTHON}"
}
python_install_all() {
if use examples; then
insinto /usr/share/doc/${PF}/examples
doins -r demos/.
docompress -x /usr/share/doc/${PF}/examples
fi
distutils-r1_python_install_all
}

View file

@ -0,0 +1,56 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="Python web framework and asynchronous networking library"
HOMEPAGE="https://www.tornadoweb.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
IUSE="examples test"
RESTRICT="!test? ( test )"
CDEPEND="
>=dev-python/pycurl-7.19.3.1[${PYTHON_USEDEP}]
>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
${CDEPEND}
dev-python/mock[${PYTHON_USEDEP}]
)
"
RDEPEND="${CDEPEND}"
distutils_enable_sphinx docs \
dev-python/sphinx_rtd_theme \
dev-python/sphinxcontrib-asyncio
# doc without intersphinx does not build (asyncio error)
#PATCHES=(
# "${FILESDIR}"/4.5.1-drop-intersphinx.patch
#)
python_test() {
local -x ASYNC_TEST_TIMEOUT=60
"${PYTHON}" -m tornado.test.runtests --verbose ||
die "tests failed under ${EPYTHON}"
}
python_install_all() {
if use examples; then
insinto /usr/share/doc/${PF}/examples
doins -r demos/.
docompress -x /usr/share/doc/${PF}/examples
fi
distutils-r1_python_install_all
}

View file

@ -0,0 +1,53 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="Python web framework and asynchronous networking library"
HOMEPAGE="https://www.tornadoweb.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="examples test"
RESTRICT="!test? ( test )"
CDEPEND="
>=dev-python/pycurl-7.19.3.1[${PYTHON_USEDEP}]
>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
${CDEPEND}
dev-python/mock[${PYTHON_USEDEP}]
)
"
RDEPEND="${CDEPEND}"
distutils_enable_sphinx docs \
dev-python/sphinx_rtd_theme
# doc without intersphinx does not build (asyncio error)
#PATCHES=(
# "${FILESDIR}"/4.5.1-drop-intersphinx.patch
#)
python_test() {
"${PYTHON}" -m tornado.test.runtests || die "tests failed under ${EPYTHON}"
}
python_install_all() {
if use examples; then
insinto /usr/share/doc/${PF}/examples
doins -r demos/.
docompress -x /usr/share/doc/${PF}/examples
fi
distutils-r1_python_install_all
}

View file

@ -0,0 +1,50 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1
DESCRIPTION="Python web framework and asynchronous networking library"
HOMEPAGE="https://www.tornadoweb.org/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86"
IUSE="examples test"
RESTRICT="!test? ( test )"
CDEPEND="
>=dev-python/pycurl-7.19.3.1[${PYTHON_USEDEP}]
>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
"
DEPEND="
test? (
${CDEPEND}
dev-python/mock[${PYTHON_USEDEP}]
)
"
RDEPEND="${CDEPEND}"
distutils_enable_sphinx docs \
dev-python/sphinx_rtd_theme \
dev-python/sphinxcontrib-asyncio
python_test() {
local -x ASYNC_TEST_TIMEOUT=60
"${PYTHON}" -m tornado.test.runtests --verbose ||
die "tests failed under ${EPYTHON}"
}
python_install_all() {
if use examples; then
docinto examples
dodoc -r demos/.
docompress -x /usr/share/doc/${PF}/examples
fi
distutils-r1_python_install_all
}