Browse Source

dev-python/cfu: test handling

Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr
master
Alarig Le Lay 1 year ago
parent
commit
9fd71e3319
Signed by: alarig
GPG Key ID: 7AFE62C6DF8BCDEC
  1. 19
      dev-python/cfu/cfu-1.5.0.ebuild

19
dev-python/cfu/cfu-1.5.0.ebuild

@ -14,7 +14,24 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
DEPEND=""
RDEPEND="${DEPEND}"
RDEPEND="${DEPEND}
test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
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…
Cancel
Save