summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-03-02 07:17:50 +0000
committerMichał Górny <mgorny@gentoo.org>2013-03-02 07:17:50 +0000
commitbc58be2e6d765b5870de68b9a6f558a923d0f7e4 (patch)
tree9578fc8c943b36b1089b2866a5e184b301faaa26 /eclass
parentOverride build locations and set PYTHONPATH in in-source builds, to increase ... (diff)
downloadhistorical-bc58be2e6d765b5870de68b9a6f558a923d0f7e4.tar.gz
historical-bc58be2e6d765b5870de68b9a6f558a923d0f7e4.tar.bz2
historical-bc58be2e6d765b5870de68b9a6f558a923d0f7e4.zip
Run *_all() phases in best-impl sources, in an in-source build.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/distutils-r1.eclass13
2 files changed, 16 insertions, 2 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 6dba3da4d064..12ea07303154 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.697 2013/03/02 07:16:43 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.698 2013/03/02 07:17:50 mgorny Exp $
+
+ 02 Mar 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
+ Run *_all() phases in best-impl sources, in an in-source build.
02 Mar 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
Override build locations and set PYTHONPATH in in-source builds, to increase
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 07df9ba513a1..ca525731f163 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-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/distutils-r1.eclass,v 1.59 2013/03/02 07:16:43 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.60 2013/03/02 07:17:50 mgorny Exp $
# @ECLASS: distutils-r1
# @MAINTAINER:
@@ -578,6 +578,9 @@ distutils-r1_run_phase() {
# @INTERNAL
# @DESCRIPTION:
# Run the given command, restoring the best-implementation state.
+#
+# If in-source build is used, the command will be run in the copy
+# of sources made for the best Python interpreter.
_distutils-r1_run_common_phase() {
local DISTUTILS_ORIG_BUILD_DIR=${BUILD_DIR}
@@ -588,8 +591,16 @@ _distutils-r1_run_common_phase() {
export EPYTHON PYTHON PYTHONPATH
+ if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
+ pushd "${BUILD_DIR}"/.. >/dev/null || die
+ fi
+
einfo "common: running ${1}"
"${@}"
+
+ if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
+ popd >/dev/null || die
+ fi
}
# @FUNCTION: _distutils-r1_multijob_init