Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog distutils-r1.eclass
Date: Thu, 01 Nov 2012 12:19:39
Message-Id: 20121101121922.6C27321600@flycatcher.gentoo.org
1 mgorny 12/11/01 12:19:22
2
3 Modified: ChangeLog distutils-r1.eclass
4 Log:
5 Export PYTHONPATH for phases in out-of-source builds.
6
7 Revision Changes Path
8 1.494 eclass/ChangeLog
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.494&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.494&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.493&r2=1.494
13
14 Index: ChangeLog
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
17 retrieving revision 1.493
18 retrieving revision 1.494
19 diff -u -r1.493 -r1.494
20 --- ChangeLog 1 Nov 2012 12:18:31 -0000 1.493
21 +++ ChangeLog 1 Nov 2012 12:19:22 -0000 1.494
22 @@ -1,6 +1,9 @@
23 # ChangeLog for eclass directory
24 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.493 2012/11/01 12:18:31 mgorny Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.494 2012/11/01 12:19:22 mgorny Exp $
27 +
28 + 01 Nov 2012; Michał Górny <mgorny@g.o> distutils-r1.eclass:
29 + Export PYTHONPATH for phases in out-of-source builds.
30
31 01 Nov 2012; Michał Górny <mgorny@g.o> distutils-r1.eclass:
32 Explicitly set library build dir in out-of-source builds.
33
34
35
36 1.17 eclass/distutils-r1.eclass
37
38 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?rev=1.17&view=markup
39 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?rev=1.17&content-type=text/plain
40 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/distutils-r1.eclass?r1=1.16&r2=1.17
41
42 Index: distutils-r1.eclass
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v
45 retrieving revision 1.16
46 retrieving revision 1.17
47 diff -u -r1.16 -r1.17
48 --- distutils-r1.eclass 1 Nov 2012 12:18:31 -0000 1.16
49 +++ distutils-r1.eclass 1 Nov 2012 12:19:22 -0000 1.17
50 @@ -1,6 +1,6 @@
51 # Copyright 1999-2012 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 -# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.16 2012/11/01 12:18:31 mgorny Exp $
54 +# $Header: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v 1.17 2012/11/01 12:19:22 mgorny Exp $
55
56 # @ECLASS: distutils-r1
57 # @MAINTAINER:
58 @@ -332,12 +332,22 @@
59 # @USAGE: [<argv>...]
60 # @INTERNAL
61 # @DESCRIPTION:
62 -# Run the given command in BUILD_DIR.
63 +# Run the given command.
64 +#
65 +# If out-of-source builds are used, the phase function is run in source
66 +# directory, with BUILD_DIR pointing at the build directory
67 +# and PYTHONPATH having an entry for the module build directory.
68 +#
69 +# If in-source builds are used, the command is executed in the BUILD_DIR
70 +# (the directory holding per-implementation copy of sources).
71 distutils-r1_run_phase() {
72 debug-print-function ${FUNCNAME} "${@}"
73
74 if [[ ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
75 pushd "${BUILD_DIR}" &>/dev/null || die
76 + else
77 + local PYTHONPATH="${BUILD_DIR}/lib:${PYTHONPATH}"
78 + export PYTHONPATH
79 fi
80
81 "${@}" || die "${1} failed."