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