summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-07-27 16:34:48 +0000
committerMichał Górny <mgorny@gentoo.org>2015-07-27 16:34:48 +0000
commit266fceadb216878e2bbf680020128f5ba5d909e9 (patch)
tree5555bf978219fcb23a6fdb71b0f1d0933a0c263d /eclass
parentpython_wrapper_setup(): wrap pythonN-config as well as suggested by PEP and r... (diff)
downloadgentoo-2-266fceadb216878e2bbf680020128f5ba5d909e9.tar.gz
gentoo-2-266fceadb216878e2bbf680020128f5ba5d909e9.tar.bz2
gentoo-2-266fceadb216878e2bbf680020128f5ba5d909e9.zip
Ban calling pythonN and pythonN-config when the other version of Python is selected (i.e. ban python2 when python3 is used).
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/python-utils-r1.eclass8
2 files changed, 10 insertions, 4 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 1167985a989e..5dd12d40fa9c 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1730 2015/07/27 16:34:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1731 2015/07/27 16:34:48 mgorny Exp $
+
+ 27 Jul 2015; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
+ Ban calling pythonN and pythonN-config when the other version of Python is
+ selected (i.e. ban python2 when python3 is used).
27 Jul 2015; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
python_wrapper_setup(): wrap pythonN-config as well as suggested by PEP and
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 807ecdf6efcd..2bd58d9fd9f9 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.86 2015/07/27 16:34:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.87 2015/07/27 16:34:48 mgorny Exp $
# @ECLASS: python-utils-r1
# @MAINTAINER:
@@ -847,11 +847,13 @@ python_wrapper_setup() {
local EPYTHON PYTHON
python_export "${impl}" EPYTHON PYTHON
- local pyver
+ local pyver pyother
if python_is_python3; then
pyver=3
+ pyother=2
else
pyver=2
+ pyother=3
fi
# Python interpreter
@@ -865,7 +867,7 @@ python_wrapper_setup() {
cp "${workdir}/bin/python" "${workdir}/bin/python${pyver}" || die
chmod +x "${workdir}/bin/python" "${workdir}/bin/python${pyver}" || die
- local nonsupp=()
+ local nonsupp=( "python${pyother}" "python${pyother}-config" )
# CPython-specific
if [[ ${EPYTHON} == python* ]]; then