commit:     06b4786d43ab3e9dc6be6eedb5fe32131b90d60b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat May 24 06:00:05 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May 24 06:11:05 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06b4786d

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

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/scikit-build/scikit-build-0.18.1.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dev-python/scikit-build/scikit-build-0.18.1.ebuild 
b/dev-python/scikit-build/scikit-build-0.18.1.ebuild
index 1d6982e04366..78907c3c3d29 100644
--- a/dev-python/scikit-build/scikit-build-0.18.1.ebuild
+++ b/dev-python/scikit-build/scikit-build-0.18.1.ebuild
@@ -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
 }

Reply via email to