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 C3B07138397 for ; Sun, 27 Oct 2013 19:16:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 899F7E0BD8; Sun, 27 Oct 2013 19:16:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1156AE0BD8 for ; Sun, 27 Oct 2013 19:16:21 +0000 (UTC) Received: from pomiot.lan (77-255-21-180.adsl.inetia.pl [77.255.21.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 1492433EFA1; Sun, 27 Oct 2013 19:16:19 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-python@lists.gentoo.org Cc: python@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-python] [PATCH distutils-r1] Provide Python env in python_prepare_all(). Date: Sun, 27 Oct 2013 20:16:33 +0100 Message-Id: <1382901393-27141-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.8.4 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Discussions centering around the Python ecosystem in Gentoo Linux X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org X-Archives-Salt: f7fac7f9-fcf9-4e35-96dd-b15f79b6e1f3 X-Archives-Hash: eeaf0dea1f803945f5b1aeb6dc87f2f2 Some of the ebuilds need that, and call 'python_export_best' explicitly for that reason. It is better to handle it eclass-wide, and therefore gain consistency with other _all() phases. --- eclass/distutils-r1.eclass | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 2b609b4..b3ffd13 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -655,12 +655,21 @@ distutils-r1_src_prepare() { local _DISTUTILS_DEFAULT_CALLED - # common preparations - if declare -f python_prepare_all >/dev/null; then - python_prepare_all - else - distutils-r1_python_prepare_all - fi + _distutils-r1_run_prepare_all() { + # we need to keep those local to ensure that the best-impl + # setting doesn't leak through to per-impl phases + local -x EPYTHON PYTHON + local -x PATH=${PATH} PKG_CONFIG_PATH=${PKG_CONFIG_PATH} + python_setup + + # common preparations + if declare -f python_prepare_all >/dev/null; then + python_prepare_all + else + distutils-r1_python_prepare_all + fi + } + _distutils-r1_run_prepare_all if [[ ! ${_DISTUTILS_DEFAULT_CALLED} ]]; then eqawarn "QA warning: python_prepare_all() didn't call distutils-r1_python_prepare_all" -- 1.8.4