dev-python/scikit-build: Fix post-test cleanup

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2025-05-24 08:00:05 +02:00
parent 748c6da09b
commit 06b4786d43

View File

@@ -56,6 +56,7 @@ src_prepare() {
}
python_test() {
local EPYTEST_DESELECT=(
# Internet (via new setuptools?)
tests/test_hello_cpp.py::test_hello_develop
@@ -70,9 +71,12 @@ python_test() {
;;
esac
# create a separate test tree since skbuild tests install random stuff
cp -r "${BUILD_DIR}"/{install,test} || die
local -x PATH=${BUILD_DIR}/test${EPREFIX}/usr/bin:${PATH}
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest -p pytest_mock \
-m "not isolated and not nosetuptoolsscm" \
-o tmp_path_retention_count=1
rm -r "${BUILD_DIR}/install$(python_get_sitedir)"/{easy-install.pth,*.egg,*.egg-link} || die
}