*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / flask-debug / flask-debug-0.4.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( pypy3 python{2_7,3_{6,7}} )
6
7 inherit distutils-r1
8
9 MY_PN="Flask-Debug"
10 DESCRIPTION="Flask extension that displays various debugging insights during development"
11 HOMEPAGE="https://github.com/mbr/Flask-Debug"
12 # PyPI tarballs don't include tests
13 # https://github.com/mbr/Flask-Debug/pull/2
14 SRC_URI="https://github.com/mbr/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
15
16 LICENSE="MIT"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="doc test"
20 RESTRICT="!test? ( test )"
21
22 RDEPEND="
23         dev-python/flask[${PYTHON_USEDEP}]
24         dev-python/inflection[${PYTHON_USEDEP}]
25         dev-python/jinja[${PYTHON_USEDEP}]
26 "
27 DEPEND="
28         dev-python/setuptools[${PYTHON_USEDEP}]
29         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
30         test? (
31                 ${RDEPEND}
32                 dev-python/pytest[${PYTHON_USEDEP}]
33         )
34 "
35
36 S="${WORKDIR}/${MY_PN}-${PV}"
37
38 python_prepare_all() {
39         sed -i "s/, 'sphinx.ext.intersphinx'//" docs/conf.py || die
40         distutils-r1_python_prepare_all
41 }
42
43 python_compile_all() {
44         if use doc; then
45                 sphinx-build docs docs/_build/html || die
46                 HTML_DOCS=( docs/_build/html/. )
47         fi
48 }
49
50 python_test() {
51         pytest -vv || die "Tests failed with ${EPYTHON}"
52 }