Gentoo Archives: gentoo-dev

From: Corentin Chary <corentin.chary@×××××.com>
To: gentoo-dev@l.g.o
Cc: justin <jlec@g.o>
Subject: Re: [gentoo-dev] New eclass for Python
Date: Wed, 04 Apr 2012 08:51:13
Message-Id: CAHR064hOevJa9vBXdndsZqTyR-bhnfT7iKL5vYazCqB-DQ0Afg@mail.gmail.com
In Reply to: Re: [gentoo-dev] New eclass for Python by Krzysztof Pawlik
1 On Mon, Mar 26, 2012 at 6:23 PM, Krzysztof Pawlik <nelchael@g.o> wrote:
2 > On 26/03/12 18:11, Krzysztof Pawlik wrote:
3 >> On 26/03/12 09:20, justin wrote:
4 >>> On 25/03/12 20:56, Krzysztof Pawlik wrote:
5 >>>> On 28/02/12 22:13, Krzysztof Pawlik wrote:
6 >>>>> If there are no objections then during the weekend (March 3, 4) I will add this
7 >>>>> to portage (after finishing remaining TODO items, PyPy requires 4G of RAM(!!)).
8 >>>>
9 >>>> Hello,
10 >>>>
11 >>>> Slightly late due to Real Life™ but finally it's in the main tree :)
12 >>>>
13 >>>> (and yes - I've tested it with pypy - works as expected :)
14 >>>>
15 >>>
16 >>> Hi,
17 >>>
18 >>> is there any documentation beside the man page somewhere?
19 >>
20 >> No.
21 >>
22 >>> I tried to port some ebuilds but as soon I set
23 >>>
24 >>> PYTHON_COMPAT="python2_7 python2_6 python2_5 pypy1_8"
25 >>>
26 >>> inherit python-distutils-ng
27 >>>
28 >>> I get
29 >>>
30 >>>   REQUIRED_USE: USE flag 'python_targets_python3_1' is not in IUSE
31 >>>
32 >>> Did I do something wrong, or is there something not straight in the eclass?
33 >>
34 >> Can you send me the whole ebuild off-list?
35 >>
36 >> There are two ebuilds using the eclass that I've used as tests:
37 >> http://git.overlays.gentoo.org/gitweb/?p=dev/nelchael.git;a=tree;f=dev-python;h=f1a8e00e3e6df33806d8972c8898f1187163bd3d;hb=HEAD
38 >
39 > Ok, found a bug: REQUIRED_USE can't contain elements not in USE, so if you
40 > excluded python3_1 from PYTHON_COMPAT it didn't appear in IUSE too ->
41 > REQUIRED_USE contained invalid value. Fixed by below patch:
42 >
43 > nelchael@s-lappy ~/.../gentoo-x86/eclass$ cvs diff
44 > Index: python-distutils-ng.eclass
45 > ===================================================================
46 > RCS file: /var/cvsroot/gentoo-x86/eclass/python-distutils-ng.eclass,v
47 > retrieving revision 1.2
48 > diff -u -r1.2 python-distutils-ng.eclass
49 > --- python-distutils-ng.eclass  26 Mar 2012 06:12:53 -0000      1.2
50 > +++ python-distutils-ng.eclass  26 Mar 2012 16:20:52 -0000
51 > @@ -105,11 +105,11 @@
52 >        esac
53 >  }
54 >
55 > -required_use_str=" || (
56 > -       python_targets_python2_5 python_targets_python2_6 python_targets_python2_7
57 > -       python_targets_python3_1 python_targets_python3_2
58 > -       python_targets_jython2_5
59 > -       python_targets_pypy1_7 python_targets_pypy1_8 )"
60 > +required_use_str=""
61 > +for impl in ${PYTHON_COMPAT}; do
62 > +       required_use_str="${required_use_str} python_targets_${impl}"
63 > +done
64 > +required_use_str=" || ( ${required_use_str} )"
65 >  if [[ "${PYTHON_OPTIONAL}" = "yes" ]]; then
66 >        IUSE+="python"
67 >        REQUIRED_USE+=" python? ( ${required_use_str} )"
68 >
69 >
70 > --
71 > Krzysztof Pawlik  <nelchael at gentoo.org>  key id: 0xF6A80E46
72 > desktop-misc, java, vim, kernel, python, apache...
73 >
74
75 I have a feature request for distutil-ng (or maybe it's already
76 possible but I don't know how).
77
78 I have a package that depends on python-dateutil:python-2 for
79 python2_x and python-dateutil:python-3 for python3_x.
80 Would it be possible to have virtual targets like "python, python2,
81 python3, pypi, jithon" ?
82
83 Thanks,
84
85
86 --
87 Corentin Chary
88 http://xf.iksaif.net

Replies

Subject Author
Re: [gentoo-dev] New eclass for Python Mike Gilbert <floppym@g.o>
Re: [gentoo-dev] New eclass for Python Mike Gilbert <floppym@g.o>