*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / wsgiproxy2 / wsgiproxy2-0.4.4-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python2_7 python3_{6,7} )
7
8 inherit distutils-r1
9
10 MY_PN="WSGIProxy2"
11
12 DESCRIPTION="HTTP proxying tools for WSGI apps"
13 HOMEPAGE="https://pypi.org/project/WSGIProxy2/"
14 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
15
16 LICENSE="MIT"
17 SLOT="0"
18 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sh ~sparc ~x86"
19 IUSE="doc test"
20 RESTRICT="!test? ( test )"
21
22 RDEPEND="dev-python/urllib3[${PYTHON_USEDEP}]
23         dev-python/requests[${PYTHON_USEDEP}]
24         dev-python/webob[${PYTHON_USEDEP}]
25         dev-python/six[${PYTHON_USEDEP}]"
26 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
27         test? ( ${RDEPEND}
28                 >=dev-python/webtest-2.0.17[${PYTHON_USEDEP}]
29                 dev-python/socketpool[${PYTHON_USEDEP}]
30                 dev-python/restkit[$(python_gen_usedep python2_7)] )"
31 # Tests needing restkit are skipped under py3
32 # Testing also revealed the suite needs latest webtest
33
34 S="${WORKDIR}/${MY_PN}-${PV}"
35
36 python_compile_all() {
37         if use doc; then
38                 cd docs || die
39                 sphinx-build -b html -d _build/doctrees   . _build/html
40         fi
41 }
42
43 python_test() {
44         nosetests || die "Tests fail with ${EPYTHON}"
45 }
46
47 python_install_all() {
48         use doc && local HTML_DOCS=( docs/_build/html/. )
49         distutils-r1_python_install_all
50 }