1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 python3_6 )
9 DESCRIPTION="Code Metrics in Python"
10 HOMEPAGE="https://radon.readthedocs.org/"
11 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
15 KEYWORDS="~amd64 ~x86"
17 RESTRICT="!test? ( test )"
19 CDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
21 >=dev-python/colorama-0.3[${PYTHON_USEDEP}]
22 <dev-python/colorama-0.4[${PYTHON_USEDEP}]
23 dev-python/flake8-polyfill[${PYTHON_USEDEP}]
24 >=dev-python/mando-0.3[${PYTHON_USEDEP}]
25 <dev-python/mando-0.4[${PYTHON_USEDEP}]
28 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
32 dev-python/nose[${PYTHON_USEDEP}]
33 dev-python/mock[${PYTHON_USEDEP}]
34 dev-python/paramunittest[${PYTHON_USEDEP}]
42 python_compile_all() {
43 use doc && emake -C docs html
47 "${PYTHON}" radon/tests/run.py || die "tests failed to run under ${EPYTHON}"
50 python_install_all() {
51 use doc && local HTML_DOCS=( docs/_build/html/. )
53 distutils-r1_python_install_all