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 F3C781381F3 for ; Wed, 1 May 2013 20:43:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 43C9AE0940; Wed, 1 May 2013 20:43:09 +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 5EBAAE0938 for ; Wed, 1 May 2013 20:43:08 +0000 (UTC) Received: from localhost (77-255-24-177.adsl.inetia.pl [77.255.24.177]) (using SSLv3 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 8CD1033E077; Wed, 1 May 2013 20:43:06 +0000 (UTC) Date: Wed, 1 May 2013 22:42:05 +0200 From: =?ISO-8859-2?B?TWljaGGzIEfzcm55?= To: gentoo-dev@lists.gentoo.org Cc: python@gentoo.org Subject: [gentoo-dev] [PATCHES] distutils-r1: support 'edefault' in sub-phase functions Message-ID: <20130501224205.374ae039@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA512; boundary="Sig_/nZU4n88yw=v.wgIRnG+T7lf"; protocol="application/pgp-signature" X-Archives-Salt: 5d7c1334-84d5-4aad-af5f-113ba66bd996 X-Archives-Hash: 24f5f66f70d1b88c7d5386f5d0b4e5b5 --Sig_/nZU4n88yw=v.wgIRnG+T7lf Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Hi, everyone. This one goes to gentoo-dev since it's a potentially wider idea and I'd like to get other developers opinion on. As you most likely already know, distutils-r1 allows ebuilds to define sub-phase functions like: python_compile() { # commands which will be run for each impl do_something_magical } Often, ebuilds do not want to override the sub-phases completely but instead call the default implementation: python_install_all() { use doc && local HTML_DOCS=3D( doc/html/. ) distutils-r1_python_install_all } So the behavior is quite similar to the regular phase functions. However, the function names ended up quite verbose. To make this more friendly, I would likely to locally introduce 'edefault' function in the eclass (name can change). The function would -- similarly to 'default' in regular phase functions -- call the default code for the sub-phase. For example, the above would change to: python_install_all() { use doc && local HTML_DOCS=3D( doc/html/. ) edefault } I will send in reply a patch adding the described magic to the eclass, and a second one showing how an example ebuild can be changed (dev-python/setuptools). What are your thoughts? --=20 Best regards, Micha=B3 G=F3rny --Sig_/nZU4n88yw=v.wgIRnG+T7lf Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQJ8BAEBCgBmBQJRgX4dXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RUJGMjBGOTk2RkIzQzIyQ0M2RkNBNDBC QUJGMUQ1RkY4QzgxMTBBAAoJELq/HV/4yBEKvHYQAMtBkhYGhr606eahf2r7NeEK oTw5ZqNXLL/iztZNdfwCCDinN/a0u/BwqXFx3LujiXSkE1ik9bJ/yGdfHKUMF8u5 Yn188O9JIenSkvsaWYK8BaiNXAvGDIM63I3HW/VxajzoUXi2B+sUzQ+tzltb8wv9 53ACFYu+8GAAM2TDQOSRQ8sYxieXLVrTxOjDTSKWTE+6BmXpz8Tx73YGkhEJryEd i5h+oyaYysa4nCEkddkwqWxkGbS+ocWd1vZvhvhH63P0mNcUvNgbQop4s3LO2o8h /21RtbIWpS/6ZJK/5/7agRSfxeoQHzsZR2w9DZJ+4aaKzojYYOtZ/UJRPF4v/4se HyvPBapLrSFGXL8Qmb9X71tOdvVyGHThxhrhjr57UHgqfJLTi7m1UXJ+iXXuOA5/ YR4UJrUOvLM2gwqkGuwqDOWobmiqrIQWPr1PV3B8BNTz3Nc6PLOxT5ifoKcYl69N SrOfNzlJMbXt7nVP+94AnIOXNqz8nrNptAaVt+czyB1/+ldvo7wWjTXOi9embqhZ rc7EDi4k7vymCclArsH2+mtMvwsbe+hxEI1uEZgdUUdDjWUZYslifjHSaZ53iVbr H9QpCqNAJEEcG/yvOmixoUlo7ZKAT5zwFt+fMouUhw5YvkyUbJpvQC5xqOlLVuu8 XUx/esAFtG5cCFXBwtBZ =PyWd -----END PGP SIGNATURE----- --Sig_/nZU4n88yw=v.wgIRnG+T7lf--