From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B3C2F13822D for ; Tue, 1 Jan 2013 19:55:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC4F6E03E4; Tue, 1 Jan 2013 19:55:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 36F71E03E4 for ; Tue, 1 Jan 2013 19:55:17 +0000 (UTC) Received: from pomiocik.lan (213-238-105-58.adsl.inetia.pl [213.238.105.58]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 5516933C2F0; Tue, 1 Jan 2013 19:55:15 +0000 (UTC) Date: Tue, 1 Jan 2013 20:55:27 +0100 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: Mike Gilbert Cc: gentoo-python Subject: Re: [gentoo-python] Re: [PATCH] Support overriding job-count for distutils-r1 multiprocessing. Message-ID: <20130101205527.245df32a@pomiocik.lan> In-Reply-To: References: <1357059468-27708-1-git-send-email-mgorny@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.14; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Discussions centering around the Python ecosystem in Gentoo Linux X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/JdfVyYTh+p1GqArb7YiIX6P"; protocol="application/pgp-signature" X-Archives-Salt: 40e7e6f3-d83a-4918-bbc6-29b7731b9b20 X-Archives-Hash: c15142428f00867222bf84ff2b172527 --Sig_/JdfVyYTh+p1GqArb7YiIX6P Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 1 Jan 2013 14:15:35 -0500 Mike Gilbert wrote: > On Tue, Jan 1, 2013 at 11:57 AM, Micha=C5=82 G=C3=B3rny wrote: > > --- > > gx86/eclass/distutils-r1.eclass | 44 ++++++++++++++++++++++++++++-----= -------- > > 1 file changed, 30 insertions(+), 14 deletions(-) > > > > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1= .eclass > > index e288c2c..3312505 100644 > > --- a/gx86/eclass/distutils-r1.eclass > > +++ b/gx86/eclass/distutils-r1.eclass > > @@ -68,6 +68,14 @@ if [[ ! ${_DISTUTILS_R1} ]]; then > > RDEPEND=3D${PYTHON_DEPS} > > DEPEND=3D${PYTHON_DEPS} > > > > +# @ECLASS-VARIABLE: DISTUTILS_JOBS > > +# @DEFAULT_UNSET > > +# @DECRIPTION: > > +# The number of parallel jobs to run for distutils-r1 parallel builds. > > +# If unset, the job-count in ${MAKEOPTS} will be used. > > +# > > +# This variable is intended to be set in make.conf. > > + > > # @ECLASS-VARIABLE: PATCHES > > # @DEFAULT_UNSET > > # @DESCRIPTION: > > @@ -144,15 +152,6 @@ DEPEND=3D${PYTHON_DEPS} > > # This variable can be used to disable the afore-mentioned feature > > # in case it causes issues with the package. > > > > -# > > -# If in-source builds are used, the eclass will create a copy of packa= ge > > -# sources for each Python implementation in python_prepare_all(), > > -# and work on that copy afterwards. > > -# > > -# If out-of-source builds are used, the eclass will instead work > > -# on the sources directly, prepending setup.py arguments with > > -# 'build --build-base ${BUILD_DIR}' to enforce keeping & using built > > -# files in the specific root. > > # @ECLASS-VARIABLE: mydistutilsargs > > # @DEFAULT_UNSET > > # @DESCRIPTION: > > @@ -425,6 +424,23 @@ _distutils-r1_run_common_phase() { > > "${@}" > > } > > > > +# @FUNCTION: _distutils-r1_multijob_init > > +# @INTERNAL > > +# @DESCRIPTION: > > +# Init multijob, taking the job-count from ${DISTUTILS_JOBS}. > > +_distutils-r1_multijob_init() { > > + debug-print-function ${FUNCNAME} "${@}" > > + > > + local opts > > + if [[ ${DISTUTILS_JOBS} ]]; then > > + opts=3D-j${DISTUTILS_JOBS} > > + else > > + opts=3D${MAKEOPTS} > > + fi > > + > > + multijob_init "${opts}" > > +} > > + > > distutils-r1_src_prepare() { > > debug-print-function ${FUNCNAME} "${@}" > > > > @@ -435,7 +451,7 @@ distutils-r1_src_prepare() { > > distutils-r1_python_prepare_all > > fi > > > > - multijob_init > > + _distutils-r1_multijob_init > > if declare -f python_prepare >/dev/null; then > > python_foreach_impl distutils-r1_run_phase python_prepa= re > > else > > @@ -445,7 +461,7 @@ distutils-r1_src_prepare() { > > } > > > > distutils-r1_src_configure() { > > - multijob_init > > + _distutils-r1_multijob_init > > if declare -f python_configure >/dev/null; then > > python_foreach_impl distutils-r1_run_phase python_confi= gure > > else > > @@ -461,7 +477,7 @@ distutils-r1_src_configure() { > > distutils-r1_src_compile() { > > debug-print-function ${FUNCNAME} "${@}" > > > > - multijob_init > > + _distutils-r1_multijob_init > > if declare -f python_compile >/dev/null; then > > python_foreach_impl distutils-r1_run_phase python_compi= le > > else > > @@ -477,7 +493,7 @@ distutils-r1_src_compile() { > > distutils-r1_src_test() { > > debug-print-function ${FUNCNAME} "${@}" > > > > - multijob_init > > + _distutils-r1_multijob_init > > if declare -f python_test >/dev/null; then > > python_foreach_impl distutils-r1_run_phase python_test > > else > > @@ -493,7 +509,7 @@ distutils-r1_src_test() { > > distutils-r1_src_install() { > > debug-print-function ${FUNCNAME} "${@}" > > > > - multijob_init > > + _distutils-r1_multijob_init > > if declare -f python_install >/dev/null; then > > python_foreach_impl distutils-r1_run_phase python_insta= ll > > else > > -- > > 1.8.0.2 > > >=20 > Seems ok. Was this requested by someone? By me ;). I have MAKEOPTS=3D-j6 because of distcc, and it kills my system with nose's tests. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/JdfVyYTh+p1GqArb7YiIX6P Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iJwEAQEIAAYFAlDjPzAACgkQfXuS5UK5QB3d8QP8DZss6yf8TZQgjrJS2QrNR9e/ DU+lERm6AjKkPMyxA0m9BQIT84NpytUZS2Pz2YUvXwbk1RBX9Fy3bOxwR3bRlqmB dT2QuVMysPYBbC4fOAOdwOw0WleL4NavQswEN/18qNV5SmnXdhKqVn/s2rdzM2Ve Dz9EgN/1HNDvwIubIPc= =lWdd -----END PGP SIGNATURE----- --Sig_/JdfVyYTh+p1GqArb7YiIX6P--