summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-04-30 05:32:51 +0000
committerMichał Górny <mgorny@gentoo.org>2013-04-30 05:32:51 +0000
commit15abeff42a7e803ce96c3f08cc451e4a0bcd4ea7 (patch)
tree7c99c18faa5499bbc081b9ca3d28be3e8f818642 /eclass/python-any-r1.eclass
parentFix double ${D} for bug #467886. (diff)
downloadhistorical-15abeff42a7e803ce96c3f08cc451e4a0bcd4ea7.tar.gz
historical-15abeff42a7e803ce96c3f08cc451e4a0bcd4ea7.tar.bz2
historical-15abeff42a7e803ce96c3f08cc451e4a0bcd4ea7.zip
Improve consistency in Python version checks and wrapper setup.
Diffstat (limited to 'eclass/python-any-r1.eclass')
-rw-r--r--eclass/python-any-r1.eclass15
1 files changed, 10 insertions, 5 deletions
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index dc3443b75f00..db42e2e718b7 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-any-r1.eclass,v 1.7 2013/04/07 17:02:52 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-any-r1.eclass,v 1.8 2013/04/30 05:32:51 mgorny Exp $
# @ECLASS: python-any-r1
# @MAINTAINER:
@@ -158,7 +158,11 @@ _python_EPYTHON_supported() {
esac
if has "${i}" "${PYTHON_COMPAT[@]}"; then
- return 0
+ local PYTHON_PKG_DEP
+ python_export "${i}" PYTHON_PKG_DEP
+ if ROOT=/ has_version "${PYTHON_PKG_DEP}"; then
+ return 0
+ fi
elif ! has "${i}" "${_PYTHON_ALL_IMPLS[@]}"; then
ewarn "Invalid EPYTHON: ${EPYTHON}"
fi
@@ -176,6 +180,7 @@ python-any-r1_pkg_setup() {
if [[ ${EPYTHON} ]]; then
if _python_EPYTHON_supported "${EPYTHON}"; then
python_export EPYTHON PYTHON
+ python_wrapper_setup "${T}"
return
fi
fi
@@ -190,6 +195,7 @@ python-any-r1_pkg_setup() {
break
elif _python_EPYTHON_supported "${i}"; then
python_export "${i}" EPYTHON PYTHON
+ python_wrapper_setup "${T}"
return
fi
done
@@ -202,10 +208,9 @@ python-any-r1_pkg_setup() {
fi
done
- local PYTHON_PKG_DEP
for i in "${rev_impls[@]}"; do
- python_export "${i}" PYTHON_PKG_DEP EPYTHON PYTHON
- if ROOT=/ has_version "${PYTHON_PKG_DEP}"; then
+ python_export "${i}" EPYTHON PYTHON
+ if _python_EPYTHON_supported "${EPYTHON}"; then
python_wrapper_setup "${T}"
return
fi