Gentoo Archives: gentoo-python

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

Attachments

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