1 |
This seems a bit safer, and provides users with expectable way of |
2 |
obtaining the location of those sources. The original sources directory |
3 |
can be still obtained via ${S}. |
4 |
--- |
5 |
gx86/eclass/distutils-r1.eclass | 11 +++++++++++ |
6 |
1 file changed, 11 insertions(+) |
7 |
|
8 |
diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass |
9 |
index 0c5abff..7a295c2 100644 |
10 |
--- a/gx86/eclass/distutils-r1.eclass |
11 |
+++ b/gx86/eclass/distutils-r1.eclass |
12 |
@@ -580,6 +580,9 @@ distutils-r1_run_phase() { |
13 |
# @INTERNAL |
14 |
# @DESCRIPTION: |
15 |
# Run the given command, restoring the best-implementation state. |
16 |
+# |
17 |
+# If in-source build is used, the command will be run in the copy |
18 |
+# of sources made for the best Python interpreter. |
19 |
_distutils-r1_run_common_phase() { |
20 |
local DISTUTILS_ORIG_BUILD_DIR=${BUILD_DIR} |
21 |
|
22 |
@@ -590,8 +593,16 @@ _distutils-r1_run_common_phase() { |
23 |
|
24 |
export EPYTHON PYTHON PYTHONPATH |
25 |
|
26 |
+ if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then |
27 |
+ pushd "${BUILD_DIR}"/.. >/dev/null || die |
28 |
+ fi |
29 |
+ |
30 |
einfo "common: running ${1}" |
31 |
"${@}" |
32 |
+ |
33 |
+ if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then |
34 |
+ popd >/dev/null || die |
35 |
+ fi |
36 |
} |
37 |
|
38 |
# @FUNCTION: _distutils-r1_multijob_init |
39 |
-- |
40 |
1.8.1.4 |