summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-11-07 10:28:21 +0100
committerMichał Górny <mgorny@gentoo.org>2015-11-11 11:21:02 +0100
commit85b6221484774c97ba06fcac3451c711b3046b88 (patch)
treec9b7913a868054bb3d74fe4acbbd2d0f48115a46 /eclass
parentpython-utils-r1.eclass: Switch tests to use python3.4 (diff)
downloadgentoo-85b6221484774c97ba06fcac3451c711b3046b88.tar.gz
gentoo-85b6221484774c97ba06fcac3451c711b3046b88.tar.bz2
gentoo-85b6221484774c97ba06fcac3451c711b3046b88.zip
python-utils-r1.eclass: set PYTHON locally in python_export()
Ensure that PYTHON is always set inside python_export() for convenience. If it wasn't requested for explicit export, make it a local variable.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/python-utils-r1.eclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index a80bdf436eb8..69166cfbf9db 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -248,6 +248,12 @@ python_export() {
esac
debug-print "${FUNCNAME}: implementation: ${impl}"
+ # make sure it doesn't leave our function unless desired
+ if ! has PYTHON "${@}"; then
+ local PYTHON
+ fi
+ export PYTHON=${EPREFIX}/usr/bin/${impl}
+
for var; do
case "${var}" in
EPYTHON)
@@ -255,7 +261,7 @@ python_export() {
debug-print "${FUNCNAME}: EPYTHON = ${EPYTHON}"
;;
PYTHON)
- export PYTHON=${EPREFIX}/usr/bin/${impl}
+ # already exported above
debug-print "${FUNCNAME}: PYTHON = ${PYTHON}"
;;
PYTHON_SITEDIR)