[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    [gentoo-dev] [PATCH distutils-r1 2/2] Export PYTHONPATH=${BUILD_DIR}/lib for out-of-source builds.
From:       Michał Górny <mgorny () gentoo ! org>
Date:       2012-10-31 13:37:10
Message-ID: 1351690630-18973-2-git-send-email-mgorny () gentoo ! org
[Download RAW message or body]

This may help a few test suites and shouldn't hurt much of the others
(which weren't broken already).

Done only for out-of-source builds as that's where we control the build
directories.
---
 gx86/eclass/distutils-r1.eclass | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index 3b86afd..d748621 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -331,12 +331,22 @@ distutils-r1_python_install_all() {
 # @USAGE: [<argv>...]
 # @INTERNAL
 # @DESCRIPTION:
-# Run the given command in BUILD_DIR.
+# Run the given command.
+#
+# If out-of-source builds are used, the phase function is run in source
+# directory, with BUILD_DIR pointing at the build directory
+# and PYTHONPATH having an entry for the module build directory.
+#
+# If in-source builds are used, the command is executed in the BUILD_DIR
+# (the directory holding per-implementation copy of sources).
 distutils-r1_run_phase() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
 		pushd "${BUILD_DIR}" &>/dev/null || die
+	else
+		local PYTHONPATH="${BUILD_DIR}/lib:${PYTHONPATH}"
+		export PYTHONPATH
 	fi
 
 	"${@}" || die "${1} failed."
-- 
1.7.12.4


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic