* [gentoo-python] [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set.
@ 2013-01-11 21:03 Michał Górny
2013-01-11 21:03 ` [gentoo-python] [PATCH 2/2] Make option passing docs clear Michał Górny
2013-01-12 18:54 ` [gentoo-python] Re: [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set Mike Gilbert
0 siblings, 2 replies; 4+ messages in thread
From: Michał Górny @ 2013-01-11 21:03 UTC (permalink / raw
To: gentoo-python; +Cc: python, hasufell, Michał Górny
This is cleaner, and also permits passing global setup.py options.
---
gx86/eclass/distutils-r1.eclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index 8156a36..1958b1a 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -175,13 +175,13 @@ DEPEND=${PYTHON_DEPS}
esetup.py() {
debug-print-function ${FUNCNAME} "${@}"
- local args=()
+ local add_args=()
if [[ ! ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
if [[ ! ${BUILD_DIR} ]]; then
die 'Out-of-source build requested, yet BUILD_DIR unset.'
fi
- args+=(
+ add_args+=(
build
--build-base "${BUILD_DIR}"
# using a single directory for them helps us export ${PYTHONPATH}
@@ -192,7 +192,7 @@ esetup.py() {
fi
set -- "${PYTHON:-python}" setup.py \
- "${args[@]}" "${mydistutilsargs[@]}" "${@}"
+ "${mydistutilsargs[@]}" "${@}" "${add_args[@]}"
echo "${@}" >&2
"${@}" || die
--
1.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-python] [PATCH 2/2] Make option passing docs clear.
2013-01-11 21:03 [gentoo-python] [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set Michał Górny
@ 2013-01-11 21:03 ` Michał Górny
2013-01-12 18:54 ` [gentoo-python] Re: [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set Mike Gilbert
1 sibling, 0 replies; 4+ messages in thread
From: Michał Górny @ 2013-01-11 21:03 UTC (permalink / raw
To: gentoo-python; +Cc: python, hasufell, Michał Górny
---
gx86/eclass/distutils-r1.eclass | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
index 1958b1a..64ec5b1 100644
--- a/gx86/eclass/distutils-r1.eclass
+++ b/gx86/eclass/distutils-r1.eclass
@@ -168,8 +168,9 @@ DEPEND=${PYTHON_DEPS}
# @DESCRIPTION:
# Run the setup.py using currently selected Python interpreter
# (if ${PYTHON} is set; fallback 'python' otherwise). The setup.py will
-# be passed default command-line arguments, then ${mydistutilsargs[@]},
-# then any parameters passed to this command.
+# be passed default ${mydistutilsargs[@]}, then any parameters passed
+# to this command and optionally a standard option set (e.g. the build
+# directory in an ebuild using out-of-source builds).
#
# This command dies on failure.
esetup.py() {
@@ -228,9 +229,7 @@ distutils-r1_python_prepare_all() {
# @FUNCTION: distutils-r1_python_prepare
# @DESCRIPTION:
-# The default python_prepare(). Currently it is a no-op
-# but in the future it may apply implementation-specific quirks
-# to the build system.
+# The default python_prepare(). A no-op.
distutils-r1_python_prepare() {
debug-print-function ${FUNCNAME} "${@}"
@@ -239,7 +238,7 @@ distutils-r1_python_prepare() {
# @FUNCTION: distutils-r1_python_configure
# @DESCRIPTION:
-# The default python_configure(). Currently a no-op.
+# The default python_configure(). A no-op.
distutils-r1_python_configure() {
debug-print-function ${FUNCNAME} "${@}"
@@ -250,7 +249,8 @@ distutils-r1_python_configure() {
# @USAGE: [additional-args...]
# @DESCRIPTION:
# The default python_compile(). Runs 'esetup.py build'. Any parameters
-# passed to this function will be passed to setup.py.
+# passed to this function will be appended to setup.py invocation,
+# i.e. passed as options to the 'build' command.
distutils-r1_python_compile() {
debug-print-function ${FUNCNAME} "${@}"
@@ -259,7 +259,7 @@ distutils-r1_python_compile() {
# @FUNCTION: distutils-r1_python_test
# @DESCRIPTION:
-# The default python_test(). Currently a no-op.
+# The default python_test(). A no-op.
distutils-r1_python_test() {
debug-print-function ${FUNCNAME} "${@}"
@@ -304,7 +304,8 @@ _distutils-r1_rename_scripts() {
# @DESCRIPTION:
# The default python_install(). Runs 'esetup.py install', appending
# the optimization flags. Then renames the installed scripts.
-# Any parameters passed to this function will be passed to setup.py.
+# Any parameters passed to this function will be appended
+# to the setup.py invocation (i.e. as options to the 'install' command).
distutils-r1_python_install() {
debug-print-function ${FUNCNAME} "${@}"
--
1.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-python] Re: [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set.
2013-01-11 21:03 [gentoo-python] [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set Michał Górny
2013-01-11 21:03 ` [gentoo-python] [PATCH 2/2] Make option passing docs clear Michał Górny
@ 2013-01-12 18:54 ` Mike Gilbert
2013-01-12 22:50 ` Michał Górny
1 sibling, 1 reply; 4+ messages in thread
From: Mike Gilbert @ 2013-01-12 18:54 UTC (permalink / raw
To: Michał Górny; +Cc: gentoo-python, python, hasufell
[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]
On 01/11/2013 04:03 PM, Michał Górny wrote:
> This is cleaner, and also permits passing global setup.py options.
> ---
> gx86/eclass/distutils-r1.eclass | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
> index 8156a36..1958b1a 100644
> --- a/gx86/eclass/distutils-r1.eclass
> +++ b/gx86/eclass/distutils-r1.eclass
> @@ -175,13 +175,13 @@ DEPEND=${PYTHON_DEPS}
> esetup.py() {
> debug-print-function ${FUNCNAME} "${@}"
>
> - local args=()
> + local add_args=()
> if [[ ! ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
> if [[ ! ${BUILD_DIR} ]]; then
> die 'Out-of-source build requested, yet BUILD_DIR unset.'
> fi
>
> - args+=(
> + add_args+=(
> build
> --build-base "${BUILD_DIR}"
> # using a single directory for them helps us export ${PYTHONPATH}
> @@ -192,7 +192,7 @@ esetup.py() {
> fi
>
> set -- "${PYTHON:-python}" setup.py \
> - "${args[@]}" "${mydistutilsargs[@]}" "${@}"
> + "${mydistutilsargs[@]}" "${@}" "${add_args[@]}"
>
> echo "${@}" >&2
> "${@}" || die
>
Does putting the build command after the install command make it do
anything differently?
If it works, lgtm.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 230 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-python] Re: [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set.
2013-01-12 18:54 ` [gentoo-python] Re: [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set Mike Gilbert
@ 2013-01-12 22:50 ` Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2013-01-12 22:50 UTC (permalink / raw
To: Mike Gilbert; +Cc: gentoo-python, python, hasufell
[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]
On Sat, 12 Jan 2013 13:54:24 -0500
Mike Gilbert <floppym@gentoo.org> wrote:
> On 01/11/2013 04:03 PM, Michał Górny wrote:
> > This is cleaner, and also permits passing global setup.py options.
> > ---
> > gx86/eclass/distutils-r1.eclass | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
> > index 8156a36..1958b1a 100644
> > --- a/gx86/eclass/distutils-r1.eclass
> > +++ b/gx86/eclass/distutils-r1.eclass
> > @@ -175,13 +175,13 @@ DEPEND=${PYTHON_DEPS}
> > esetup.py() {
> > debug-print-function ${FUNCNAME} "${@}"
> >
> > - local args=()
> > + local add_args=()
> > if [[ ! ${DISTUTILS_IN_SOURCE_BUILD} ]]; then
> > if [[ ! ${BUILD_DIR} ]]; then
> > die 'Out-of-source build requested, yet BUILD_DIR unset.'
> > fi
> >
> > - args+=(
> > + add_args+=(
> > build
> > --build-base "${BUILD_DIR}"
> > # using a single directory for them helps us export ${PYTHONPATH}
> > @@ -192,7 +192,7 @@ esetup.py() {
> > fi
> >
> > set -- "${PYTHON:-python}" setup.py \
> > - "${args[@]}" "${mydistutilsargs[@]}" "${@}"
> > + "${mydistutilsargs[@]}" "${@}" "${add_args[@]}"
> >
> > echo "${@}" >&2
> > "${@}" || die
> >
>
> Does putting the build command after the install command make it do
> anything differently?
>
> If it works, lgtm.
distutils have command dependencies, so I don't think it should change
anything at all.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-12 22:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11 21:03 [gentoo-python] [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set Michał Górny
2013-01-11 21:03 ` [gentoo-python] [PATCH 2/2] Make option passing docs clear Michał Górny
2013-01-12 18:54 ` [gentoo-python] Re: [PATCH 1/2] Pass custom arguments to esetup.py before the 'build' set Mike Gilbert
2013-01-12 22:50 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox