summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-03-02 07:16:43 +0000
committerMichał Górny <mgorny@gentoo.org>2013-03-02 07:16:43 +0000
commit4899c31e133d63835158d4298f12acdcc5abe463 (patch)
tree03c712bc5b4db2bf400393398d3674f6e1020e34 /eclass
parentIn-source builds: append "build/" subdir to the BUILD_DIR variable. It can be... (diff)
downloadhistorical-4899c31e133d63835158d4298f12acdcc5abe463.tar.gz
historical-4899c31e133d63835158d4298f12acdcc5abe463.tar.bz2
historical-4899c31e133d63835158d4298f12acdcc5abe463.zip
Override build locations and set PYTHONPATH in in-source builds, to increase compatibility with out-of-source builds.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/distutils-r1.eclass14
2 files changed, 10 insertions, 10 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 9a971b9155b5..6dba3da4d064 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.696 2013/03/02 07:13:32 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.697 2013/03/02 07:16:43 mgorny Exp $
+
+ 02 Mar 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
+ Override build locations and set PYTHONPATH in in-source builds, to increase
+ compatibility with out-of-source builds.
02 Mar 2013; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass:
In-source builds: append "build/" subdir to the BUILD_DIR variable. It can be
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 4b061ae36ed2..07df9ba513a1 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.58 2013/03/02 07:13:32 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.59 2013/03/02 07:16:43 mgorny Exp $
# @ECLASS: distutils-r1
# @MAINTAINER:
@@ -228,11 +228,7 @@ esetup.py() {
debug-print-function ${FUNCNAME} "${@}"
local add_args=()
- if [[ ! ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
- if [[ ! ${BUILD_DIR} ]]; then
- die 'Out-of-source build requested, yet BUILD_DIR unset.'
- fi
-
+ if [[ ${BUILD_DIR} ]]; then
# if setuptools is used, adjust egg_info path as well
# (disabled since it causes build not to install scripts)
# if "${PYTHON:-python}" setup.py --help egg_info &>/dev/null; then
@@ -249,6 +245,8 @@ esetup.py() {
# make the ebuild writer lives easier
--build-scripts "${BUILD_DIR}/scripts"
)
+ elif [[ ! ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
+ die 'Out-of-source build requested, yet BUILD_DIR unset.'
fi
set -- "${PYTHON:-python}" setup.py \
@@ -546,10 +544,8 @@ distutils-r1_run_phase() {
pushd "${BUILD_DIR}" >/dev/null || die
fi
local BUILD_DIR=${BUILD_DIR}/build
- else
- local PYTHONPATH="${BUILD_DIR}/lib:${PYTHONPATH}"
- export PYTHONPATH
fi
+ local -x PYTHONPATH="${BUILD_DIR}/lib:${PYTHONPATH}"
local TMPDIR=${T}/${EPYTHON}