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