1 |
Den 2013-03-21 15:55:23 skrev Michał Górny <mgorny@g.o>: |
2 |
|
3 |
> On Thu, 21 Mar 2013 15:30:35 +0400 |
4 |
> "Nikolaj Sjujskij" <sterkrig@×××××××.com> wrote: |
5 |
> |
6 |
>> Den 2013-03-21 14:27:42 skrev Michał Górny <mgorny@g.o>: |
7 |
>> |
8 |
>> > On Thu, 21 Mar 2013 10:59:49 +0400 |
9 |
>> > "Nikolaj Sjujskij" <sterkrig@×××××××.com> wrote: |
10 |
>> > |
11 |
>> >> Den 2013-03-20 23:03:43 skrev Michał Górny <mgorny@g.o>: |
12 |
>> >> |
13 |
>> >> > On Wed, 20 Mar 2013 15:10:18 +0400 |
14 |
>> >> > "Nikolaj Sjujskij" <sterkrig@×××××××.com> wrote: |
15 |
>> >> > |
16 |
>> >> >> Den 2013-03-18 02:33:50 skrev Michał Górny <mgorny@g.o>: |
17 |
>> >> >> |
18 |
>> >> >> > The PYTHON_COMPAT_OVERRIDE can be set in the environment to |
19 |
>> enforce |
20 |
>> >> >> > a different set of Python implementations than one being |
21 |
>> >> intersection |
22 |
>> >> >> > of PYTHON_COMPAT and PYTHON_TARGETS. |
23 |
>> >> >> > |
24 |
>> >> >> > Due to technical limitations, the variable influences only the |
25 |
>> list |
26 |
>> >> >> > of implementations actually used. USE flags, dependencies and |
27 |
>> other |
28 |
>> >> >> > metadata variables are not modified. |
29 |
>> >> >> Push it to tree, please, I'd like to test it :) |
30 |
>> >> > |
31 |
>> >> > Pushed :). |
32 |
>> >> Yup, works fine: https://bugs.gentoo.org/show_bug.cgi?id=462566 |
33 |
>> >> One minor thing. I have PYTHON_TARGETS="python2_7 python3_3" in |
34 |
>> >> make.conf, |
35 |
>> >> pylint ebuild has PYTHON_COMPAT=( python2_{5,6,7} python{3_1,3_2} ). |
36 |
>> I |
37 |
>> >> expected `PYTHON_COMPAT_OVERRIDE="python3_3" emerge -1 pylint` to |
38 |
>> >> install |
39 |
>> >> pylint for both 2.7 and 3.3. Of course, it's "OVERRIDE", not |
40 |
>> "UPDATE", |
41 |
>> >> but |
42 |
>> >> still. |
43 |
>> >> A minor thing, really, and I won't insist on changing this |
44 |
>> behaviour. |
45 |
>> >> Thanks in any case :) |
46 |
>> > |
47 |
>> > I've decided to go this way since you can't change the IUSE. |
48 |
>> Therefore, |
49 |
>> > you can't really control the enabled implementations via USE flags. If |
50 |
>> > it worked like you suggested, some of the implementations would |
51 |
>> respect |
52 |
>> > USE flags and some other wouldn't -- that would be confusing. |
53 |
>> Agreed. But what about something like this: |
54 |
>> |
55 |
>> |
56 |
>> --- /usr/portage/eclass/python-r1.eclass 2013-03-20 23:31:15.000000000 |
57 |
>> +0400 |
58 |
>> +++ python-r1.eclass 2013-03-21 15:17:58.000000000 +0400 |
59 |
>> @@ -604,11 +604,11 @@ |
60 |
>> ewarn |
61 |
>> ewarn "Dependencies won't be satisfied, and PYTHON_TARGETS will be |
62 |
>> ignored." |
63 |
>> _PYTHON_COMPAT_OVERRIDE_WARNED=1 |
64 |
>> fi |
65 |
>> |
66 |
>> - MULTIBUILD_VARIANTS=( ${PYTHON_COMPAT_OVERRIDE} ) |
67 |
>> + MULTIBUILD_VARIANTS=( ${PYTHON_COMPAT_OVERRIDE} ${PYTHON_TARGETS} ) |
68 |
>> return |
69 |
>> fi |
70 |
>> |
71 |
>> _python_validate_useflags |
72 |
>> _python_check_USE_PYTHON |
73 |
>> |
74 |
>> |
75 |
>> This way eclass would use PYTHON_TARGETS, but equally "disrespect" all |
76 |
>> the |
77 |
>> implementations regarding USE-flags etc, wouldn't it? :) |
78 |
>> (Probably we'd have to deal with duplicates in that array, but that's |
79 |
>> only |
80 |
>> an idea). |
81 |
> |
82 |
> Think of PYTHON_COMPAT_OVERRIDE='python2_7 python3_3'. Should 2_7 be |
83 |
> enabled if it's both in override and real _COMPAT, and disabled via USE |
84 |
> flag? |
85 |
It should be enabled. To be honest, I fail to see your point: in case of |
86 |
PYTHON_COMPAT_OVERRIDE='python2_7 python3_3' I see no difference in |
87 |
current code and my proposal: either way python2_7 would be enabled |
88 |
regardless of USE-flag settings, wouldn't it? |
89 |
|
90 |
On the other hand, let's consider testing something like PyQt4 with, say, |
91 |
Python 3.4, on the system with PYTHON_TARGETS="python2_7 python3_3". In |
92 |
"my case" with PYTHON_COMPAT_OVERRIDE="python3_4" module would be built |
93 |
three times, which isn't that good. Dealing in eclass with |
94 |
PYTHON_COMPAT_OVERRIDE="-python2_7 -python3_3 python3_4" could be tricky, |
95 |
so maybe the current situation is the most convenient. |