Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Krzysztof Pawlik <nelchael@g.o>
Subject: Re: New eclass for Python
Date: Mon, 26 Mar 2012 18:23:32 +0200
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 will add this
>>>> to portage (after finishing remaining TODO items, PyPy requires 4G of RAM(!!)).
>>>
>>> Hello,
>>>
>>> Slightly late due to Real Lifeā„¢ but finally it's in the main tree :)
>>>
>>> (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="python2_7 python2_6 python2_5 pypy1_8"
>>
>> inherit python-distutils-ng
>>
>> I get
>>
>>   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 eclass?
> 
> 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=dev/nelchael.git;a=tree;f=dev-python;h=f1a8e00e3e6df33806d8972c8898f1187163bd3d;hb=HEAD

Ok, found a bug: REQUIRED_USE can't contain elements not in USE, so if you
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
===================================================================
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  26 Mar 2012 06:12:53 -0000      1.2
+++ python-distutils-ng.eclass  26 Mar 2012 16:20:52 -0000
@@ -105,11 +105,11 @@
        esac
 }

-required_use_str=" || (
-       python_targets_python2_5 python_targets_python2_6 python_targets_python2_7
-       python_targets_python3_1 python_targets_python3_2
-       python_targets_jython2_5
-       python_targets_pypy1_7 python_targets_pypy1_8 )"
+required_use_str=""
+for impl in ${PYTHON_COMPAT}; do
+       required_use_str="${required_use_str} python_targets_${impl}"
+done
+required_use_str=" || ( ${required_use_str} )"
 if [[ "${PYTHON_OPTIONAL}" = "yes" ]]; then
        IUSE+="python"
        REQUIRED_USE+=" python? ( ${required_use_str} )"


-- 
Krzysztof Pawlik  <nelchael at gentoo.org>  key id: 0xF6A80E46
desktop-misc, java, vim, kernel, python, apache...

Attachment:
signature.asc (OpenPGP digital signature)
Replies:
Re: New eclass for Python
-- Corentin Chary
References:
New eclass for Python
-- Krzysztof Pawlik
Re: New eclass for Python
-- Krzysztof Pawlik
Re: New eclass for Python
-- justin
Re: New eclass for Python
-- Krzysztof Pawlik
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: New eclass for Python
Next by thread:
Re: New eclass for Python
Previous by date:
Re: New eclass for Python
Next by date:
automated bug filing (i.e. pybugz) failing because of missing token


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.