1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA256 |
3 |
|
4 |
On 19/09/12 01:37 PM, Michał Górny wrote: |
5 |
> On Wed, 19 Sep 2012 09:00:49 -0400 Ian Stakenvicius |
6 |
> <axs@g.o> wrote: |
7 |
> |
8 |
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 |
9 |
>> |
10 |
>> On 19/09/12 06:00 AM, Micha? Górny wrote: |
11 |
>>> --- gx86/eclass/python-distutils-ng.eclass | 20 |
12 |
>>> ++------------------ gx86/eclass/python-r1.eclass | |
13 |
>>> 28 ++++++++++++++++++++++++++-- 2 files changed, 28 |
14 |
>>> insertions(+), 20 deletions(-) |
15 |
>>> |
16 |
>>> diff --git a/gx86/eclass/python-distutils-ng.eclass |
17 |
>>> b/gx86/eclass/python-distutils-ng.eclass index |
18 |
>>> 5df965c..bffe563 100644 --- |
19 |
>>> a/gx86/eclass/python-distutils-ng.eclass +++ |
20 |
>>> b/gx86/eclass/python-distutils-ng.eclass @@ -74,24 +74,8 @@ |
21 |
>>> _python-distutils-ng_get_binary_for_implementation() { esac } |
22 |
>>> |
23 |
>>> -for impl in ${PYTHON_COMPAT[@]}; do - dep_str="${impl/_/.}" - |
24 |
>>> case "${dep_str}" in - python?.?) - |
25 |
>>> dep_str="dev-lang/python:${dep_str: -3}" ;; - jython?.?) - |
26 |
>>> dep_str="dev-java/jython:${dep_str: -3}" ;; - pypy?.?) - |
27 |
>>> dep_str="dev-python/pypy:${dep_str: -3}" ;; - *) - die |
28 |
>>> "Unsupported implementation: ${impl}" ;; - esac - |
29 |
>>> dep_str="python_targets_${impl}? ( ${dep_str} )" - - |
30 |
>>> RDEPEND="${RDEPEND} ${dep_str}" - DEPEND="${DEPEND} ${dep_str}" |
31 |
>>> - unset dep_str -done +RDEPEND=${PYTHON_DEPEND} |
32 |
>>> +DEPEND=${PYTHON_DEPEND} |
33 |
>>> |
34 |
>>> _PACKAGE_SPECIFIC_S="${S#${WORKDIR}/}" |
35 |
>>> |
36 |
>>> diff --git a/gx86/eclass/python-r1.eclass |
37 |
>>> b/gx86/eclass/python-r1.eclass index 18f9246..3017dd8 100644 |
38 |
>>> --- a/gx86/eclass/python-r1.eclass +++ |
39 |
>>> b/gx86/eclass/python-r1.eclass @@ -40,14 +40,38 @@ |
40 |
>>> _PYTHON_ALL_IMPLS=( # a package supports. It must be set before |
41 |
>>> the `inherit' call. # The default is to enable all |
42 |
>>> implementations. # -# PYTHON_COMPAT can be either a scalar or |
43 |
>>> an array. If it's a scalar, the eclass -# will implicitly |
44 |
>>> convert it to an array. +# PYTHON_COMPAT can be either a scalar |
45 |
>>> or an array. If it's a scalar, +# the eclass will implicitly |
46 |
>>> convert it to an array. : |
47 |
>>> ${PYTHON_COMPAT:=${_PYTHON_ALL_IMPLS[@]}} |
48 |
>>> |
49 |
>>> +# @ECLASS-VARIABLE: PYTHON_DEPEND +# @DESCRIPTION: +# This is |
50 |
>>> an eclass-generated Python dependency string for all +# |
51 |
>>> implementations listed in PYTHON_COMPAT. + PYTHON_COMPAT=( |
52 |
>>> ${PYTHON_COMPAT[@]} ) |
53 |
>>> |
54 |
>>> _python_set_globals() { |
55 |
>>> IUSE=${PYTHON_COMPAT[@]/#/python_targets_} REQUIRED_USE="|| ( |
56 |
>>> ${IUSE} )" + + PYTHON_DEPEND= + local i + for i in |
57 |
>>> ${PYTHON_COMPAT[@]}; do + local d + case ${i} in + python*) + |
58 |
>>> d='dev-lang/python';; + jython*) + d='dev-java/jython';; + |
59 |
>>> pypy*) + d='dev-python/pypy';; + *) + die "Invalid |
60 |
>>> implementation: ${i}" + esac + + local v=${i##*[a-z]} + |
61 |
>>> PYTHON_DEPEND+=" python_targets_${i}? ( ${d}:${v/_/.} )" + done |
62 |
>>> } _python_set_globals |
63 |
>> |
64 |
>> |
65 |
>> I think we really need to use a different variable than |
66 |
>> "PYTHON_DEPEND". There are ebuilds that inherit both |
67 |
>> python.eclass and python-distutils-ng.eclass and so this will |
68 |
>> obviously break those cases.. (that said, I do think that |
69 |
>> python-r1.eclass should gain whatever bits it is missing so said |
70 |
>> inherit on python.eclass isn't necessary, but that's beside the |
71 |
>> point) |
72 |
> |
73 |
> I'm not sure if we shouldn't forbid inheriting both eclasses. |
74 |
> That's a bit risky, at least. And it's very likely that someone is |
75 |
> doing something very wrong and not noticing the failure yet. |
76 |
> |
77 |
|
78 |
We can forbid a double-inherit, but that doesn't mean we should allow |
79 |
PYTHON_DEPEND to be overloaded with two different meanings. |
80 |
|
81 |
I would recommend instead to use 'PYTHON_DEPS'; it's different, and is |
82 |
a more generic name which would seem to fit better when appended to |
83 |
either/both DEPEND and RDEPEND. |
84 |
|
85 |
-----BEGIN PGP SIGNATURE----- |
86 |
Version: GnuPG v2.0.19 (GNU/Linux) |
87 |
|
88 |
iF4EAREIAAYFAlBaB74ACgkQ2ugaI38ACPD4mwD/e++PURTyeBoeFZodadFVDBYh |
89 |
tBIuTaDFeuR7+PKNgPwA/1WFz8urK1ErpDLWTVsLqIUZra0L0RFG5/d+8jr3DPVQ |
90 |
=bZPZ |
91 |
-----END PGP SIGNATURE----- |