summaryrefslogtreecommitdiff
path: root/eclass
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
commit0ef429b49e8698199981fced5a9c8d830e25864e (patch)
treeb07aefc2dd2213b6ca3c4fb415e4b5d56ccd3946 /eclass
parentFix double ${D} for bug #467886. (diff)
downloadgentoo-2-0ef429b49e8698199981fced5a9c8d830e25864e.tar.gz
gentoo-2-0ef429b49e8698199981fced5a9c8d830e25864e.tar.bz2
gentoo-2-0ef429b49e8698199981fced5a9c8d830e25864e.zip
Improve consistency in Python version checks and wrapper setup.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/python-any-r1.eclass15
2 files changed, 14 insertions, 6 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index ddd86367afb7..04024544f6ff 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.804 2013/04/29 22:14:23 tomwij Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.805 2013/04/30 05:32:51 mgorny Exp $
+
+ 30 Apr 2013; Michal Gorny <mgorny@gentoo.org> python-any-r1.eclass:
+ Improve consistency in Python version checks and wrapper setup.
29 Apr 2013; Tom Wijsman <TomWij@gentoo.org> kernel-2.eclass:
Corrected UNIPATCH_DOCS functionality, this went unnoticed since
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