1 |
Den 2013-03-21 14:27:42 skrev Michał Górny <mgorny@g.o>: |
2 |
|
3 |
> On Thu, 21 Mar 2013 10:59:49 +0400 |
4 |
> "Nikolaj Sjujskij" <sterkrig@×××××××.com> wrote: |
5 |
> |
6 |
>> Den 2013-03-20 23:03:43 skrev Michał Górny <mgorny@g.o>: |
7 |
>> |
8 |
>> > On Wed, 20 Mar 2013 15:10:18 +0400 |
9 |
>> > "Nikolaj Sjujskij" <sterkrig@×××××××.com> wrote: |
10 |
>> > |
11 |
>> >> Den 2013-03-18 02:33:50 skrev Michał Górny <mgorny@g.o>: |
12 |
>> >> |
13 |
>> >> > The PYTHON_COMPAT_OVERRIDE can be set in the environment to enforce |
14 |
>> >> > a different set of Python implementations than one being |
15 |
>> intersection |
16 |
>> >> > of PYTHON_COMPAT and PYTHON_TARGETS. |
17 |
>> >> > |
18 |
>> >> > Due to technical limitations, the variable influences only the list |
19 |
>> >> > of implementations actually used. USE flags, dependencies and other |
20 |
>> >> > metadata variables are not modified. |
21 |
>> >> Push it to tree, please, I'd like to test it :) |
22 |
>> > |
23 |
>> > Pushed :). |
24 |
>> Yup, works fine: https://bugs.gentoo.org/show_bug.cgi?id=462566 |
25 |
>> One minor thing. I have PYTHON_TARGETS="python2_7 python3_3" in |
26 |
>> make.conf, |
27 |
>> pylint ebuild has PYTHON_COMPAT=( python2_{5,6,7} python{3_1,3_2} ). I |
28 |
>> expected `PYTHON_COMPAT_OVERRIDE="python3_3" emerge -1 pylint` to |
29 |
>> install |
30 |
>> pylint for both 2.7 and 3.3. Of course, it's "OVERRIDE", not "UPDATE", |
31 |
>> but |
32 |
>> still. |
33 |
>> A minor thing, really, and I won't insist on changing this behaviour. |
34 |
>> Thanks in any case :) |
35 |
> |
36 |
> I've decided to go this way since you can't change the IUSE. Therefore, |
37 |
> you can't really control the enabled implementations via USE flags. If |
38 |
> it worked like you suggested, some of the implementations would respect |
39 |
> USE flags and some other wouldn't -- that would be confusing. |
40 |
Agreed. But what about something like this: |
41 |
|
42 |
|
43 |
--- /usr/portage/eclass/python-r1.eclass 2013-03-20 23:31:15.000000000 |
44 |
+0400 |
45 |
+++ python-r1.eclass 2013-03-21 15:17:58.000000000 +0400 |
46 |
@@ -604,11 +604,11 @@ |
47 |
ewarn |
48 |
ewarn "Dependencies won't be satisfied, and PYTHON_TARGETS will be |
49 |
ignored." |
50 |
_PYTHON_COMPAT_OVERRIDE_WARNED=1 |
51 |
fi |
52 |
|
53 |
- MULTIBUILD_VARIANTS=( ${PYTHON_COMPAT_OVERRIDE} ) |
54 |
+ MULTIBUILD_VARIANTS=( ${PYTHON_COMPAT_OVERRIDE} ${PYTHON_TARGETS} ) |
55 |
return |
56 |
fi |
57 |
|
58 |
_python_validate_useflags |
59 |
_python_check_USE_PYTHON |
60 |
|
61 |
|
62 |
This way eclass would use PYTHON_TARGETS, but equally "disrespect" all the |
63 |
implementations regarding USE-flags etc, wouldn't it? :) |
64 |
(Probably we'd have to deal with duplicates in that array, but that's only |
65 |
an idea). |