pylama: Fix installation

This commit is contained in:
Nils Freydank 2020-03-03 08:39:55 +01:00
parent 10387bd596
commit 34187ce8a5
No known key found for this signature in database
GPG Key ID: BC5DC2998AAD2B21

View File

@ -4,6 +4,7 @@
EAPI="7"
PYTHON_COMPAT=( python3_{6,7} )
DISTUTILS_USE_SETUPTOOLS="rdepend"
inherit distutils-r1
@ -19,8 +20,8 @@ KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
>=dev-python/mccabe-0.5.2[${PYTHON_USEDEP}]
dev-python/pycodestyle[${PYTHON_USEDEP}]
dev-python/pydocstyle[${PYTHON_USEDEP}]
@ -35,6 +36,15 @@ DEPEND="
)
"
src_prepare() {
default
if ! use test
then
rm ${S}/tests -r || die
fi
}
python_test() {
py.test -v test_pylama.py || die "tests failed with ${EPYTHON}"
}