www-servers/tornado: mark s390 stable
[gentoo.git] / www-servers / tornado / tornado-4.5.3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
7 PYTHON_REQ_USE="threads(+)"
8
9 inherit distutils-r1
10
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"
14
15 LICENSE="Apache-2.0"
16 SLOT="0"
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"
19
20 CDEPEND="
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')
24         || (
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')
28                 )
29         )
30         virtual/python-backports_abc[${PYTHON_USEDEP}]
31         virtual/python-futures[${PYTHON_USEDEP}]
32         virtual/python-singledispatch[${PYTHON_USEDEP}]
33 "
34 DEPEND="
35         dev-python/setuptools[${PYTHON_USEDEP}]
36         doc? (
37                 dev-python/sphinx[${PYTHON_USEDEP}]
38                 dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
39         )
40         test? (
41                 ${CDEPEND}
42                 dev-python/mock[${PYTHON_USEDEP}]
43         )
44 "
45 RDEPEND="${CDEPEND}"
46
47 # doc without intersphinx does not build (asyncio error)
48 #PATCHES=(
49 #       "${FILESDIR}"/4.5.1-drop-intersphinx.patch
50 #)
51
52 python_compile_all() {
53         use doc && emake -C docs sphinx
54 }
55
56 python_test() {
57         "${PYTHON}" -m tornado.test.runtests || die "tests failed under ${EPYTHON}"
58 }
59
60 python_install_all() {
61         use doc && local HTML_DOCS=( docs/build/html/. )
62         if use examples; then
63                 insinto /usr/share/doc/${PF}/examples
64                 doins -r demos/.
65                 docompress -x /usr/share/doc/${PF}/examples
66 fi
67         distutils-r1_python_install_all
68 }