1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
7 PYTHON_REQ_USE="threads(+)"
11 DESCRIPTION="Python web framework and asynchronous networking library"
12 HOMEPAGE="http://www.tornadoweb.org/"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
17 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
18 IUSE="doc examples test"
21 dev-python/certifi[${PYTHON_USEDEP}]
22 >=dev-python/pycurl-7.19.3.1[${PYTHON_USEDEP}]
23 $(python_gen_cond_dep '>=dev-python/backports-ssl-match-hostname-3.5[${PYTHON_USEDEP}]' 'python2_7' 'python3_4')
25 >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
26 ( $(python_gen_cond_dep 'dev-python/twisted-names[${PYTHON_USEDEP}]' 'python2_7')
27 $(python_gen_cond_dep 'dev-python/twisted-web[${PYTHON_USEDEP}]' 'python2_7')
30 virtual/python-backports_abc[${PYTHON_USEDEP}]
31 virtual/python-futures[${PYTHON_USEDEP}]
32 virtual/python-singledispatch[${PYTHON_USEDEP}]
35 dev-python/setuptools[${PYTHON_USEDEP}]
37 dev-python/sphinx[${PYTHON_USEDEP}]
38 dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
42 dev-python/mock[${PYTHON_USEDEP}]
47 # doc without intersphinx does not build (asyncio error)
49 # "${FILESDIR}"/4.5.1-drop-intersphinx.patch
52 python_compile_all() {
53 use doc && emake -C docs sphinx
57 "${PYTHON}" -m tornado.test.runtests || die "tests failed under ${EPYTHON}"
60 python_install_all() {
61 use doc && local HTML_DOCS=( docs/build/html/. )
63 insinto /usr/share/doc/${PF}/examples
65 docompress -x /usr/share/doc/${PF}/examples
67 distutils-r1_python_install_all