* [gentoo-python] [PATCH] distutils-r1.eclass: Reverse order of esetup.py arguments and clarify documentation
@ 2013-03-11 20:27 Mike Gilbert
0 siblings, 0 replies; only message in thread
From: Mike Gilbert @ 2013-03-11 20:27 UTC (permalink / raw
To: gentoo-python
[-- Attachment #1: Type: text/plain, Size: 874 bytes --]
I ran into some trouble with net-misc/flexget, and it is probably an
issue for other paver-based python packages as well.
Basically, if the build options are passed after the install options,
they are ignored and the default build directory (build/lib) is used
instead. This causes some interesting failures when building in parallel.
An easy workaround is to pass the build command and options before the
install command and options. This requires a small modification to
esetup.py. See attached patch.
This also makes the esetup.py function more flexible in general since it
allows options to be passed both before and after the build command.
The patch also removes a duplicate 'build' command from
distutils-r1_python_compile, which may also cause problems for paver.
I do plan to look into the paver issue further, but I would like to make
this adjustment anyway.
[-- Attachment #2: distutils-r1.patch --]
[-- Type: text/plain, Size: 1572 bytes --]
Index: distutils-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/distutils-r1.eclass,v
retrieving revision 1.63
diff -u -B -r1.63 distutils-r1.eclass
--- distutils-r1.eclass 9 Mar 2013 13:13:02 -0000 1.63
+++ distutils-r1.eclass 11 Mar 2013 20:04:15 -0000
@@ -209,11 +209,13 @@
# @FUNCTION: esetup.py
# @USAGE: [<args>...]
# @DESCRIPTION:
-# Run the setup.py using currently selected Python interpreter
-# (if ${PYTHON} is set; fallback 'python' otherwise). The setup.py will
-# 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).
+# Run setup.py using currently selected Python interpreter
+# (if ${PYTHON} is set; fallback 'python' otherwise).
+#
+# setup.py will be passed the following, in order:
+# 1. ${mydistutilsargs[@]}
+# 2. The 'build' command and standard build options including ${BUILD_DIR}
+# 3. Any additional arguments passed to the esetup.py function.
#
# This command dies on failure.
esetup.py() {
@@ -242,7 +244,7 @@
fi
set -- "${PYTHON:-python}" setup.py \
- "${mydistutilsargs[@]}" "${@}" "${add_args[@]}"
+ "${mydistutilsargs[@]}" "${add_args[@]}" "${@}"
echo "${@}" >&2
"${@}" || die
@@ -353,7 +355,7 @@
distutils-r1_python_compile() {
debug-print-function ${FUNCNAME} "${@}"
- esetup.py build "${@}"
+ esetup.py "${@}"
}
# @FUNCTION: distutils-r1_python_test
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-11 20:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 20:27 [gentoo-python] [PATCH] distutils-r1.eclass: Reverse order of esetup.py arguments and clarify documentation Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox