1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_6} )
13 DESCRIPTION="Helper to test WSGI applications"
14 HOMEPAGE="https://pypi.org/project/WebTest/"
15 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
19 KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ppc64 s390 ~sh sparc x86"
21 RESTRICT="!test? ( test )"
23 # nose<1.3.0 appears a leftover never updated in requires.txt. tests pass fine with latest
25 dev-python/six[${PYTHON_USEDEP}]
26 >=dev-python/webob-1.2[${PYTHON_USEDEP}]
27 >=dev-python/waitress-0.8.5[${PYTHON_USEDEP}]
28 dev-python/beautifulsoup:4[${PYTHON_USEDEP}]"
31 dev-python/setuptools[${PYTHON_USEDEP}]
32 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
33 test? ( dev-python/nose[${PYTHON_USEDEP}]
34 dev-python/pyquery[${PYTHON_USEDEP}]
35 dev-python/pastedeploy[${PYTHON_USEDEP}]
36 dev-python/wsgiproxy2[${PYTHON_USEDEP}]
37 dev-python/coverage[${PYTHON_USEDEP}]
38 $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7 )
41 S="${WORKDIR}/${MY_P}"
43 # Makes testing easier; otherwise we get errors from pkg_resources.
44 DISTUTILS_IN_SOURCE_BUILD=1
46 python_prepare_all() {
47 # Prevent un-needed d'loading during doc build
48 sed -s 's:intersphinx_mapping:_&:' -i docs/conf.py || die
49 distutils-r1_python_prepare_all
52 python_compile_all() {
54 sphinx-build docs html || die
59 # Tests raise ImportErrors with our default PYTHONPATH.
61 nosetests || die "Tests fail with ${EPYTHON}"
64 python_install_all() {
65 use doc && local HTML_DOCS=( html/. )
66 distutils-r1_python_install_all