summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-08-01 21:05:29 +0200
committerMichał Górny <mgorny@gentoo.org>2020-08-09 19:10:16 +0200
commit5eed45569cd54c87a16f967ec52fb5b363948818 (patch)
tree8162a68c2cddb13b9416fbba3bd51fa0a2d68ca6 /eclass/distutils-r1.eclass
parentdev-python/pillow: keyworded 7.2.0 for ia64 (diff)
downloadgentoo-5eed45569cd54c87a16f967ec52fb5b363948818.tar.gz
gentoo-5eed45569cd54c87a16f967ec52fb5b363948818.tar.bz2
gentoo-5eed45569cd54c87a16f967ec52fb5b363948818.zip
distutils-r1.eclass: Set PATH in distutils_install_for_testing
Make distutils_install_for_testing set PATH so that newly-installed scripts are available in the testing environment. Make PATH local in all sub-phases to make modifications safe. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/distutils-r1.eclass')
-rw-r--r--eclass/distutils-r1.eclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 092c0887d878..e0e7a945ab87 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -561,6 +561,7 @@ distutils_install_for_testing() {
TEST_DIR=${BUILD_DIR}/test
local bindir=${TEST_DIR}/scripts
local libdir=${TEST_DIR}/lib
+ PATH=${bindir}:${PATH}
PYTHONPATH=${libdir}:${PYTHONPATH}
local add_args=(
@@ -951,6 +952,11 @@ distutils-r1_run_phase() {
fi
local -x PYTHONPATH="${BUILD_DIR}/lib:${PYTHONPATH}"
+ # make PATH local for distutils_install_for_testing calls
+ # it makes little sense to let user modify PATH in per-impl phases
+ # and _all() already localizes it
+ local -x PATH=${PATH}
+
# Bug 559644
# using PYTHONPATH when the ${BUILD_DIR}/lib is not created yet might lead to
# problems in setup.py scripts that try to import modules/packages from that path