Ensure that PYTHON is always set inside python_export() for convenience.
If it wasn't requested for explicit export, make it a local variable.
---
eclass/python-utils-r1.eclass | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index a80bdf4..69166cf 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)
--
2.6.3