Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: Mike Gilbert <floppym@g.o>
Cc: gentoo-python@l.g.o, python@g.o
Subject: Re: [gentoo-python] Re: [PATCH] Add python_gen_cond_dep().
Date: Thu, 27 Dec 2012 22:48:55
Message-Id: 20121227234852.44b5d758@pomiocik.lan
In Reply to: [gentoo-python] Re: [PATCH] Add python_gen_cond_dep(). by Mike Gilbert
1 On Thu, 27 Dec 2012 17:38:44 -0500
2 Mike Gilbert <floppym@g.o> wrote:
3
4 > On Thu, Dec 27, 2012 at 4:59 PM, Michał Górny <mgorny@g.o> wrote:
5 > > I don't have a good idea how to make enforcing USE deps inside easier
6 > > than $(python_gen_cond_dep dev-foo/bar[$(python_gen_usedep IMPLS)]
7 > > IMPLS) without adding some risky magic.
8 >
9 > Just to confirm my thoughts, say we have this:
10 >
11 > PYTHON_COMPAT=( python2_6 python2_7 python3_2 )
12 >
13 > RDEPEND="$(python_gen_cond_dep dev-python/foo[$(python_gen_usedep
14 > python2*)] python2*)"
15 >
16 > I think you would end up with something like this:
17 >
18 > python_targets_python2_6? (
19 > python_targets_python2_6?,python_targets_python2_7?] )
20 > python_targets_python2_7? (
21 > python_targets_python2_6?,python_targets_python2_7?] )
22 >
23 > Right? Looks a bit odd, but I guess it works.
24
25 Well, you forgot about 'dev-python/foo[' but otherwise correct.
26
27 I was wondering if we could do something saner here but it either falls
28 back to using @PUT_USEDEPS_HERE@ or some implicit parsing.
29
30 It would be great if we could do at least:
31
32 RDEPEND="$(python_gen_cond_dep dev-python/foo[${PYTHON_USEDEP}]
33 python2*)"
34
35 but people would have to actually quote '${PYTHON_USEDEP}' to get it
36 evaluated in the right order so it'd just be even more confusing.
37
38 What worries me are cases like 'python{2_5,2_6,3_1} jython2_5' where
39 you'd have to repeat such a long list two times.
40
41 --
42 Best regards,
43 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-python] Re: [PATCH] Add python_gen_cond_dep(). Mike Gilbert <floppym@g.o>