1 |
This may help a few test suites and shouldn't hurt much of the others |
2 |
(which weren't broken already). |
3 |
|
4 |
Done only for out-of-source builds as that's where we control the build |
5 |
directories. |
6 |
--- |
7 |
gx86/eclass/distutils-r1.eclass | 12 +++++++++++- |
8 |
1 file changed, 11 insertions(+), 1 deletion(-) |
9 |
|
10 |
diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass |
11 |
index 3b86afd..d748621 100644 |
12 |
--- a/gx86/eclass/distutils-r1.eclass |
13 |
+++ b/gx86/eclass/distutils-r1.eclass |
14 |
@@ -331,12 +331,22 @@ distutils-r1_python_install_all() { |
15 |
# @USAGE: [<argv>...] |
16 |
# @INTERNAL |
17 |
# @DESCRIPTION: |
18 |
-# Run the given command in BUILD_DIR. |
19 |
+# Run the given command. |
20 |
+# |
21 |
+# If out-of-source builds are used, the phase function is run in source |
22 |
+# directory, with BUILD_DIR pointing at the build directory |
23 |
+# and PYTHONPATH having an entry for the module build directory. |
24 |
+# |
25 |
+# If in-source builds are used, the command is executed in the BUILD_DIR |
26 |
+# (the directory holding per-implementation copy of sources). |
27 |
distutils-r1_run_phase() { |
28 |
debug-print-function ${FUNCNAME} "${@}" |
29 |
|
30 |
if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then |
31 |
pushd "${BUILD_DIR}" &>/dev/null || die |
32 |
+ else |
33 |
+ local PYTHONPATH="${BUILD_DIR}/lib:${PYTHONPATH}" |
34 |
+ export PYTHONPATH |
35 |
fi |
36 |
|
37 |
"${@}" || die "${1} failed." |
38 |
-- |
39 |
1.7.12.4 |