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 18B0F138010 for ; Thu, 6 Sep 2012 21:28:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4E2A721C00A; Thu, 6 Sep 2012 21:28:29 +0000 (UTC) Received: from mail-ie0-f181.google.com (mail-ie0-f181.google.com [209.85.223.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 285C2E091C for ; Thu, 6 Sep 2012 21:27:40 +0000 (UTC) Received: by ieak12 with SMTP id k12so3893954iea.40 for ; Thu, 06 Sep 2012 14:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=xXT/ugwU7Fe9c7E/nTkLTK5MwHj5unPFF3+4VWQOjek=; b=l1kmsjjgLCQ1OZ0h8/uaCGFV6lAw1SdfVH0FmCTWsImMSlRZRDHWA2nK1EWvUrkh3F LozmdmsUdF+xUFypiKQMricpidiDqXItQfEXvH5H9gE1UED0cvEd8ZflNMkWYeJ0GNjS IKa4M7kaJlRFOaONq/tOVtIbYXP07wG2TN6feWM34TOopF9nPlnyWXjjiKamHf29QfYN Jfb0amvKtOCQ2+r4/dQSwJhHo0vFbvsJVI4jW02NdQB5IBq5sfVAbD5QOoshh7EJe92p XNwo5k0f7/2g1RAObk89qpLGU4kCOsil72ICx3BSQlZMjJ8GZxVu9zAD5zpgJo84yKGI 3sCQ== Received: by 10.50.104.201 with SMTP id gg9mr5055657igb.67.1346966860409; Thu, 06 Sep 2012 14:27:40 -0700 (PDT) Received: from smtp.gmail.com:587 ([2620:0:1000:fd16:224:d7ff:feae:c014]) by mx.google.com with ESMTPS id n5sm7817637igw.13.2012.09.06.14.27.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Sep 2012 14:27:39 -0700 (PDT) Received: by smtp.gmail.com:587 (sSMTP sendmail emulation); Thu, 06 Sep 2012 14:27:41 -0700 Date: Thu, 6 Sep 2012 14:27:41 -0700 From: Brian Harring To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] python-distutils-ng.eclass: allow useflag dependencies for python Message-ID: <20120906212741.GH18495@localhost> References: <50490B32.5010507@gentoo.org> 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50490B32.5010507@gentoo.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: 353f01d5-e91a-4439-bc7f-3dbe89c60502 X-Archives-Hash: 9ef209c181c2aa280e0d7229a87d6bac On Thu, Sep 06, 2012 at 10:44:34PM +0200, hasufell wrote: > I am missing a replacement for PYTHON_USE_WITH. > > Would the attached patch help in any way? Review? Other ideas? > --- 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. > > +# @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="xml,sqlite" > +# example 2: PYTHON_USE="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 > + > EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install > > case "${EAPI}" in > @@ -107,16 +126,22 @@ > fi > unset required_use_str > > +# avoid empty use deps > +[[ -n ${PYTHON_USE} ]] && _PYTHON_USE="[${PYTHON_USE}]" || _PYTHON_USE="" > +[[ -n ${JYTHON_USE} ]] && _JYTHON_USE="[${JYTHON_USE}]" || _JYTHON_USE="" > +[[ -n ${PYPY_USE} ]] && _PYPY_USE="[${PYPY_USE}]" || _PYPY_USE="" Ick. _PYTHON_USE="${PYTHON_USE:+[${PYTHON_USE}]}" _JYTHON_USE="${JYTHON_USE:+[${JYTHON_USE}]}" _PYPY_USE="${PYPY_USE:+[${PYPY_USE}]}" > + > +# set python DEPEND and RDEPEND > for impl in ${PYTHON_COMPAT}; do > IUSE+=" python_targets_${impl}" > dep_str="${impl/_/.}" > case "${dep_str}" in > python?.?) > - dep_str="dev-lang/python:${dep_str: -3}" ;; > + dep_str="dev-lang/python:${dep_str: -3}${_PYTHON_USE}" ;; should I ask wth the space is for? > jython?.?) > - dep_str="dev-java/jython:${dep_str: -3}" ;; > + dep_str="dev-java/jython:${dep_str: -3}${_JYTHON_USE}" ;; > pypy?.?) > - dep_str="dev-python/pypy:${dep_str: -3}" ;; > + dep_str="dev-python/pypy:${dep_str: -3}${_PYPY_USE}" ;; > *) > die "Unsupported implementation: ${impl}" ;; > esac