*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / mini-amf / mini-amf-0.9.1.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 inherit distutils-r1
8
9 DESCRIPTION="Minimal AMF encoder and decoder for Python"
10 HOMEPAGE="https://pypi.python.org/pypi/Mini-AMF"
11 SRC_URI="https://github.com/zackw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 IUSE="doc test"
17
18 RESTRICT="!test? ( test )"
19
20 COMMON_DEPEND="dev-python/defusedxml[${PYTHON_USEDEP}]
21         dev-python/six[${PYTHON_USEDEP}]"
22 RDEPEND="${COMMON_DEPEND}
23         dev-python/setuptools[${PYTHON_USEDEP}]"
24 DEPEND="${COMMON_DEPEND}
25         test? (
26                 dev-python/coverage[${PYTHON_USEDEP}]
27                 dev-python/flake8[${PYTHON_USEDEP}]
28         )"
29 BDEPEND="doc? ( dev-python/sphinx )"
30
31 python_test() {
32         coverage run --source=miniamf setup.py test || die
33 }
34
35 python_compile_all() {
36         distutils-r1_python_compile
37
38         if use doc ; then
39                 cd doc/ || die
40                 sphinx-build -b html . _build || die
41         fi
42 }
43
44 python_install_all() {
45         use doc && local HTML_DOCS=( doc/_build/. )
46         einstalldocs
47
48         distutils-r1_python_install_all
49 }