From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4340C1388C2 for ; Sat, 7 Nov 2015 09:40:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 156EB21C010; Sat, 7 Nov 2015 09:40:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9C3FC21C010 for ; Sat, 7 Nov 2015 09:40:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 84378340702 for ; Sat, 7 Nov 2015 09:40:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A379B1B1 for ; Sat, 7 Nov 2015 09:40:44 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1446888613.c90f29e7f7247bf1250dd4d4db79eb63c4177872.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:python-soabi-cleanup commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/python-utils-r1.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: c90f29e7f7247bf1250dd4d4db79eb63c4177872 X-VCS-Branch: python-soabi-cleanup Date: Sat, 7 Nov 2015 09:40:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 7bdc3d5c-abbc-45ab-964a-c78d5df551b1 X-Archives-Hash: 1c9d6561676e3cd158ce534f6a2dcc67 commit: c90f29e7f7247bf1250dd4d4db79eb63c4177872 Author: Michał Górny gentoo org> AuthorDate: Sat Nov 7 09:28:21 2015 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Nov 7 09:30:13 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c90f29e7 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. 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)