Gentoo Archives: gentoo-python

From: Mike Gilbert <floppym@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-python@l.g.o, python@g.o, hasufell@g.o
Subject: [gentoo-python] Re: [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set.
Date: Sat, 12 Jan 2013 21:20:08
Message-Id: 50F1B160.4070302@gentoo.org
In Reply to: [gentoo-python] [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set. by "Michał Górny"
1 On 01/11/2013 04:03 PM, Michał Górny wrote:
2 > This is cleaner, and also permits passing global setup.py options.
3 > ---
4 > gx86/eclass/distutils-r1.eclass | 6 +++---
5 > 1 file changed, 3 insertions(+), 3 deletions(-)
6 >
7 > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
8 > index 8156a36..1958b1a 100644
9 > --- a/gx86/eclass/distutils-r1.eclass
10 > +++ b/gx86/eclass/distutils-r1.eclass
11 > @@ -175,13 +175,13 @@ DEPEND=${PYTHON_DEPS}
12 > esetup.py() {
13 > debug-print-function ${FUNCNAME} "${@}"
14 >
15 > - local args=()
16 > + local add_args=()
17 > if [[ ! ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
18 > if [[ ! ${BUILD_DIR} ]]; then
19 > die 'Out-of-source build requested, yet BUILD_DIR unset.'
20 > fi
21 >
22 > - args+=(
23 > + add_args+=(
24 > build
25 > --build-base "${BUILD_DIR}"
26 > # using a single directory for them helps us export ${PYTHONPATH}
27 > @@ -192,7 +192,7 @@ esetup.py() {
28 > fi
29 >
30 > set -- "${PYTHON:-python}" setup.py \
31 > - "${args[@]}" "${mydistutilsargs[@]}" "${@}"
32 > + "${mydistutilsargs[@]}" "${@}" "${add_args[@]}"
33 >
34 > echo "${@}" >&2
35 > "${@}" || die
36 >
37
38 Does putting the build command after the install command make it do
39 anything differently?
40
41 If it works, lgtm.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies