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 8ED3A138010 for ; Thu, 6 Sep 2012 20:59:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 53E03E08A4; Thu, 6 Sep 2012 20:58:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 26CA3E0850 for ; Thu, 6 Sep 2012 20:57:14 +0000 (UTC) Received: from pomiocik.lan (213-238-104-238.adsl.inetia.pl [213.238.104.238]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 5EAF933D719; Thu, 6 Sep 2012 20:57:12 +0000 (UTC) Date: Thu, 6 Sep 2012 22:58:15 +0200 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-dev@lists.gentoo.org Cc: hasufell@gentoo.org Subject: Re: [gentoo-dev] python-distutils-ng.eclass: allow useflag dependencies for python Message-ID: <20120906225815.0bd3dab4@pomiocik.lan> In-Reply-To: <50490B32.5010507@gentoo.org> References: <50490B32.5010507@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.11; 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-SHA256; boundary="Sig_/SfYQZLF+ZH9QwmQp0XveuNN"; protocol="application/pgp-signature" X-Archives-Salt: 150c5ab7-b823-4474-a119-9774db837bd8 X-Archives-Hash: 1728de0b7aceca99405e25799fdfab28 --Sig_/SfYQZLF+ZH9QwmQp0XveuNN Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 06 Sep 2012 22:44:34 +0200 hasufell wrote: > --- python-distutils-ng.eclass > +++ python-distutils-ng.eclass > @@ -59,6 +59,25 @@ > # Set to any value to disable automatic reinstallation of scripts in > bin # directories. See python-distutils-ng_src_install function. > =20 > +# @ECLASS-VARIABLE: PYTHON_USE > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# comma seperated list of useflags needed for python > +# this is directly substituted into dev-lang/python[${PYTHON_USE}] > thus allowing +# all valid useflag dependencies > +# example 1: PYTHON_USE=3D"xml,sqlite" > +# example 2: PYTHON_USE=3D"xml?,threads?,-foo" > + > +# @ECLASS-VARIABLE: JYTHON_USE > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# same as PYTHON_USE just for JYTHON > + > +# @ECLASS-VARIABLE: PYPY_USE > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# same as PYTHON_USE just for PYPY > + Why I feel like we're close to PYTHON2_USE, PYTHON3_USE, PYTHON3NG_USE... > EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test > src_install=20 > case "${EAPI}" in > @@ -107,16 +126,22 @@ > fi > unset required_use_str > =20 > +# avoid empty use deps > +[[ -n ${PYTHON_USE} ]] && _PYTHON_USE=3D"[${PYTHON_USE}]" || > _PYTHON_USE=3D"" +[[ -n ${JYTHON_USE} ]] && > _JYTHON_USE=3D"[${JYTHON_USE}]" || _JYTHON_USE=3D"" +[[ -n ${PYPY_USE} ]] > && _PYPY_USE=3D"[${PYPY_USE}]" || _PYPY_USE=3D"" + > +# set python DEPEND and RDEPEND > for impl in ${PYTHON_COMPAT}; do > IUSE+=3D" python_targets_${impl}" > dep_str=3D"${impl/_/.}" > case "${dep_str}" in > python?.?) > - dep_str=3D"dev-lang/python:${dep_str: -3}" ;; > + dep_str=3D"dev-lang/python:${dep_str: > -3}${_PYTHON_USE}" ;; jython?.?) > - dep_str=3D"dev-java/jython:${dep_str: -3}" ;; > + dep_str=3D"dev-java/jython:${dep_str: > -3}${_JYTHON_USE}" ;; pypy?.?) > - dep_str=3D"dev-python/pypy:${dep_str: -3}" ;; > + dep_str=3D"dev-python/pypy:${dep_str: > -3}${_PYPY_USE}" ;; *) > die "Unsupported implementation: ${impl}" ;; > esac I have to think more about this. Where are your use cases? --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/SfYQZLF+ZH9QwmQp0XveuNN Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iJwEAQEIAAYFAlBJDmgACgkQfXuS5UK5QB2d0wP/RIIMN7CjbxxdA1uxhE92U2nR 1AeMbv0A+tmOk9PDJV1G9Giqt1gI0TCwaK7Ff97O5GAeKXhIErore+Vs11M6nY4p CB28P5HjJ6FjFPqWQ54ANMvzq6X4B7QMcTXUOw+oD76cb9E9GHSzS4VCormiYLBA VWur3PgsXSR0uhBqlQc= =rtS6 -----END PGP SIGNATURE----- --Sig_/SfYQZLF+ZH9QwmQp0XveuNN--