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 E4C621385A0 for ; Sun, 20 Jan 2013 18:19:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B15321C166; Sun, 20 Jan 2013 18:19:37 +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 EAE6D21C166 for ; Sun, 20 Jan 2013 18:19:36 +0000 (UTC) Received: from [192.168.1.204] (76-230-137-203.lightspeed.livnmi.sbcglobal.net [76.230.137.203]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id E744833D929; Sun, 20 Jan 2013 18:19:34 +0000 (UTC) Message-ID: <50FC3532.1060806@gentoo.org> Date: Sun, 20 Jan 2013 13:19:30 -0500 From: Mike Gilbert User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130112 Thunderbird/17.0.2 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 To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= CC: gentoo-python@lists.gentoo.org, python@gentoo.org, maksbotan@gentoo.org, sterkrig@myopera.com Subject: [gentoo-python] Re: [PATCH 1/3] Support making distutils-r1 deps and phases optional. References: <1358677094-20652-1-git-send-email-mgorny@gentoo.org> In-Reply-To: <1358677094-20652-1-git-send-email-mgorny@gentoo.org> X-Enigmail-Version: 1.5 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2JMGIIWOKTVSMUKHXVFDC" X-Archives-Salt: cab510d8-5bac-4742-94ef-72c699dd1894 X-Archives-Hash: 819210a5efebbb9b2bad80b76750b70d This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2JMGIIWOKTVSMUKHXVFDC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 01/20/2013 05:18 AM, Micha=C5=82 G=C3=B3rny wrote: > If a particular package uses distutils part only conditionally > (e.g. with USE=3Dpython), you can do something like: >=20 > DISTUTILS_OPTIONAL=3D1 > RDEPEND=3D"python? ( ${PYTHON_DEPS} )" > src_compile() { cd python; use python && distutils-r1_src_compile; } > src_test() { cd python; use python && distutils-r1_src_test; } > src_install() { cd python; use python && distutils-r1_src_install; } > --- > gx86/eclass/distutils-r1.eclass | 22 +++++++++++++++++++--- > 1 file changed, 19 insertions(+), 3 deletions(-) >=20 > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1= =2Eeclass > index 6a062ae..80734c5 100644 > --- a/gx86/eclass/distutils-r1.eclass > +++ b/gx86/eclass/distutils-r1.eclass > @@ -54,18 +54,34 @@ case "${EAPI:-0}" in > ;; > esac > =20 > +# @ECLASS-VARIABLE: DISTUTILS_OPTIONAL > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# If set to a non-null value, distutils part in the ebuild will > +# be considered optional. No dependencies will be added and no phase > +# functions will be exported. > +# > +# If you enable DISTUTILS_OPTIONAL, you have to set proper dependencie= s > +# for your package (using ${PYTHON_DEPS}) and to either call > +# distutils-r1 default phase functions or call the build system > +# manually. > + > if [[ ! ${_DISTUTILS_R1} ]]; then > =20 > inherit eutils multiprocessing python-r1 > =20 > fi > =20 > -EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_in= stall > +if [[ ! ${DISTUTILS_OPTIONAL} ]]; then > + EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_i= nstall > +fi > =20 > if [[ ! ${_DISTUTILS_R1} ]]; then > =20 > -RDEPEND=3D${PYTHON_DEPS} > -DEPEND=3D${PYTHON_DEPS} > +if [[ ! ${DISTUTILS_OPTIONAL} ]]; then > + RDEPEND=3D${PYTHON_DEPS} > + DEPEND=3D${PYTHON_DEPS} > +fi > =20 > # @ECLASS-VARIABLE: DISTUTILS_JOBS > # @DEFAULT_UNSET >=20 Looks ok. ------enig2JMGIIWOKTVSMUKHXVFDC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iF4EAREIAAYFAlD8NTIACgkQC77qH+pIQ6SBOgD/YzPgngNsvq59IotTtJbp4aoz U7Os5p82AEH/FjAeTpwBAJLmHQY1Ge+FKbUvoCQmHiQbvUAL6oHZlAJfAOdoOzgD =gzIO -----END PGP SIGNATURE----- ------enig2JMGIIWOKTVSMUKHXVFDC--