Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH distutils-r1 1/2] Explicitly set --build-lib for distutils.
Date: Wed, 31 Oct 2012 13:37:32
Message-Id: 1351690630-18973-1-git-send-email-mgorny@gentoo.org
1 Some of the packages want to access that directory (lxml for example),
2 and they have to do globbing to guess the suffix. Since we use
3 per-implementation build dirs anyway, let's just use a simple '/lib'
4 there.
5
6 I'm doing this for out-of-source builds only since we don't set
7 --build-base for in-source anyway. With in-source builds, we allow
8 setup.py to control the build locations. You can treat it as a safe
9 switch to disable our hackery for packages which are broken by it.
10 ---
11 gx86/eclass/distutils-r1.eclass | 7 ++++++-
12 1 file changed, 6 insertions(+), 1 deletion(-)
13
14 diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
15 index 172cc70..3b86afd 100644
16 --- a/gx86/eclass/distutils-r1.eclass
17 +++ b/gx86/eclass/distutils-r1.eclass
18 @@ -151,7 +151,12 @@ esetup.py() {
19 die 'Out-of-source build requested, yet BUILD_DIR unset.'
20 fi
21
22 - args+=( build --build-base "${BUILD_DIR}" )
23 + args+=(
24 + build
25 + --build-base "${BUILD_DIR}"
26 + # using a single directory for them helps us export ${PYTHONPATH}
27 + --build-lib "${BUILD_DIR}/lib"
28 + )
29 fi
30
31 set -- "${PYTHON:-python}" setup.py \
32 --
33 1.7.12.4

Replies