dev-python/cfu: test handling
Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr
This commit is contained in:
parent
6de4789fb7
commit
9fd71e3319
|
@ -14,7 +14,24 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||||
LICENSE="Apache-2.0"
|
LICENSE="Apache-2.0"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~amd64 ~x86"
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE="test"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
DEPEND=""
|
DEPEND=""
|
||||||
RDEPEND="${DEPEND}"
|
RDEPEND="${DEPEND}
|
||||||
|
test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
|
||||||
BDEPEND=""
|
BDEPEND=""
|
||||||
|
|
||||||
|
python_test() {
|
||||||
|
pytest -vv || die "Tests fail with ${EPYTHON}"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
rm_tests() {
|
||||||
|
use test || rm -r "${S}-${EPYTHON//\./_}/lib/tests"
|
||||||
|
}
|
||||||
|
python_foreach_impl rm_tests
|
||||||
|
use test || rm -r "${S}/tests"
|
||||||
|
|
||||||
|
distutils-r1_src_install
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue