From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SFLvs-0006Ds-Ni for garchives@archives.gentoo.org; Wed, 04 Apr 2012 08:51:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 324A9E0DA5; Wed, 4 Apr 2012 08:50:57 +0000 (UTC) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) by pigeon.gentoo.org (Postfix) with ESMTP id C02CBE0D73 for ; Wed, 4 Apr 2012 08:50:11 +0000 (UTC) Received: by bkwj4 with SMTP id j4so35177bkw.40 for ; Wed, 04 Apr 2012 01:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=eCJT4RO2ZktAQBMIAGbk+nYauyerz+MAYH7ZQPdrcA0=; b=ykkHzPFfylSrKRYfvJP05yZksr0g4UZQufteuf0CCrCvZZ1gUDozDc0XLpPTMFXwow /AzncezaK62/mNjJba0WnS9iBpKjRK+7bNPxost2B0hnTTcRB9qSt3vwdr8O7WYhQLbF +pNzGvJzvkFzk8riEqy2xHtvtJS//d/DrWPjmdLf/cEYYbu7iHecNxp1NtE5cnxFBy93 pHQrzCrd1UwVWztS0aUxYarOs/Q4OtgtfWx3zHf40Fg/pMrO0me2JCpwq2gFY0UBjBDw Ps2wuWHbCZRfYMifsOi9H5KzeYOibsfYHsb6Ae2OiRuF7ejscn8G0YMt095bhWsOr5xy CAdQ== 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 Received: by 10.204.151.81 with SMTP id b17mr6890523bkw.17.1333529410921; Wed, 04 Apr 2012 01:50:10 -0700 (PDT) Received: by 10.205.32.202 with HTTP; Wed, 4 Apr 2012 01:50:10 -0700 (PDT) In-Reply-To: <4F709804.8060607@gentoo.org> References: <4F4D4380.9070909@gentoo.org> <4F6F6A6A.6050303@gentoo.org> <4F7018CA.80804@gentoo.org> <4F70954D.5000401@gentoo.org> <4F709804.8060607@gentoo.org> Date: Wed, 4 Apr 2012 10:50:10 +0200 Message-ID: Subject: Re: [gentoo-dev] New eclass for Python From: Corentin Chary To: gentoo-dev@lists.gentoo.org Cc: justin Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 752e0342-3fcf-457c-822a-69592bb529b8 X-Archives-Hash: 94fb0277a2578bcc25dd3908ec2e9f8f On Mon, Mar 26, 2012 at 6:23 PM, Krzysztof Pawlik wro= te: > On 26/03/12 18:11, Krzysztof Pawlik wrote: >> On 26/03/12 09:20, justin wrote: >>> On 25/03/12 20:56, Krzysztof Pawlik wrote: >>>> On 28/02/12 22:13, Krzysztof Pawlik wrote: >>>>> If there are no objections then during the weekend (March 3, 4) I wil= l add this >>>>> to portage (after finishing remaining TODO items, PyPy requires 4G of= RAM(!!)). >>>> >>>> Hello, >>>> >>>> Slightly late due to Real Life=E2=84=A2 but finally it's in the main t= ree :) >>>> >>>> (and yes - I've tested it with pypy - works as expected :) >>>> >>> >>> Hi, >>> >>> is there any documentation beside the man page somewhere? >> >> No. >> >>> I tried to port some ebuilds but as soon I set >>> >>> PYTHON_COMPAT=3D"python2_7 python2_6 python2_5 pypy1_8" >>> >>> inherit python-distutils-ng >>> >>> I get >>> >>> =C2=A0 REQUIRED_USE: USE flag 'python_targets_python3_1' is not in IUSE >>> >>> Did I do something wrong, or is there something not straight in the ecl= ass? >> >> Can you send me the whole ebuild off-list? >> >> There are two ebuilds using the eclass that I've used as tests: >> http://git.overlays.gentoo.org/gitweb/?p=3Ddev/nelchael.git;a=3Dtree;f= =3Ddev-python;h=3Df1a8e00e3e6df33806d8972c8898f1187163bd3d;hb=3DHEAD > > Ok, found a bug: REQUIRED_USE can't contain elements not in USE, so if yo= u > excluded python3_1 from PYTHON_COMPAT it didn't appear in IUSE too -> > REQUIRED_USE contained invalid value. Fixed by below patch: > > nelchael@s-lappy ~/.../gentoo-x86/eclass$ cvs diff > Index: python-distutils-ng.eclass > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /var/cvsroot/gentoo-x86/eclass/python-distutils-ng.eclass,v > retrieving revision 1.2 > diff -u -r1.2 python-distutils-ng.eclass > --- python-distutils-ng.eclass =C2=A026 Mar 2012 06:12:53 -0000 =C2=A0 = =C2=A0 =C2=A01.2 > +++ python-distutils-ng.eclass =C2=A026 Mar 2012 16:20:52 -0000 > @@ -105,11 +105,11 @@ > =C2=A0 =C2=A0 =C2=A0 =C2=A0esac > =C2=A0} > > -required_use_str=3D" || ( > - =C2=A0 =C2=A0 =C2=A0 python_targets_python2_5 python_targets_python2_6 = python_targets_python2_7 > - =C2=A0 =C2=A0 =C2=A0 python_targets_python3_1 python_targets_python3_2 > - =C2=A0 =C2=A0 =C2=A0 python_targets_jython2_5 > - =C2=A0 =C2=A0 =C2=A0 python_targets_pypy1_7 python_targets_pypy1_8 )" > +required_use_str=3D"" > +for impl in ${PYTHON_COMPAT}; do > + =C2=A0 =C2=A0 =C2=A0 required_use_str=3D"${required_use_str} python_tar= gets_${impl}" > +done > +required_use_str=3D" || ( ${required_use_str} )" > =C2=A0if [[ "${PYTHON_OPTIONAL}" =3D "yes" ]]; then > =C2=A0 =C2=A0 =C2=A0 =C2=A0IUSE+=3D"python" > =C2=A0 =C2=A0 =C2=A0 =C2=A0REQUIRED_USE+=3D" python? ( ${required_use_str= } )" > > > -- > Krzysztof Pawlik =C2=A0 =C2=A0key id: 0xF6A80E46 > desktop-misc, java, vim, kernel, python, apache... > I have a feature request for distutil-ng (or maybe it's already possible but I don't know how). I have a package that depends on python-dateutil:python-2 for python2_x and python-dateutil:python-3 for python3_x. Would it be possible to have virtual targets like "python, python2, python3, pypi, jithon" ? Thanks, --=20 Corentin Chary http://xf.iksaif.net