1 |
On Thu, 06 Sep 2012 16:42:27 -0400 |
2 |
Ian Stakenvicius <axs@g.o> wrote: |
3 |
|
4 |
> -----BEGIN PGP SIGNED MESSAGE----- |
5 |
> Hash: SHA256 |
6 |
> |
7 |
> - -----BEGIN PGP SIGNED MESSAGE----- |
8 |
> Hash: SHA256 |
9 |
|
10 |
One signature is enough :P. |
11 |
|
12 |
> On 06/09/12 04:26 PM, Michał Górny wrote: |
13 |
> > Not that I'm that brilliant to come up with something good but it |
14 |
> > should start with 'PYTHON_', I think, and be explanatory. |
15 |
> |
16 |
> I wanted it to be short -- this is a convenience variable to be used |
17 |
> in *DEPEND; and since it contains Python Target Use Dependencies, i |
18 |
> figured the acronym was the best way to go.. |
19 |
> |
20 |
> PS, '@INTERNAL' is probably not a good tag to set here but i couldn't |
21 |
> find documentation on what tags were available; if there's a @READONLY |
22 |
> or @CONSTANT that would be best. |
23 |
|
24 |
Try looking at the awk script in eclass-manpages/files. |
25 |
|
26 |
> >> + +mysep= +PTUD= +for impl in ${PYTHON_COMPAT} ; do + |
27 |
> >> PTUD+="${mysep}python_targets_${impl}?" + mysep="," +done +unset |
28 |
> >> mysep + |
29 |
> > |
30 |
> > Nice hack with that mysep but I don't like it, sorry. I'd rather |
31 |
> > avoid temporary variables here, or use a function and a 'local' |
32 |
> > variable. Calling a function in global scope shouldn't be that |
33 |
> > bad. |
34 |
> > |
35 |
> > or just something like: |
36 |
> > |
37 |
> > PTUD=${PYTHON_COMPAT// /?,}? |
38 |
> > |
39 |
> |
40 |
> The 'for impl in ${PYTHON_COMPAT}' loop is actually run in global |
41 |
> scope later, to set *DEPEND on each python implementation; i haven't |
42 |
> checked but it's possible it can be done there. |
43 |
|
44 |
Yes, that's a good idea to join loops. Bash is not a C compiler, he |
45 |
won't do that for ya. |
46 |
|
47 |
> Also, other bits are already using temp variables in global scope. |
48 |
|
49 |
And others are also using facebook. Does that mean you really should be |
50 |
like them? |
51 |
|
52 |
> Also2, since this var needs to be substituted directly into atoms of |
53 |
> the ebuild's *DEPEND, imo it needs to be in global scope as well |
54 |
|
55 |
The variable yes, the mysep doesn't. |
56 |
|
57 |
> > But then you would have to 'clean up' PYTHON_COMPAT first to avoid |
58 |
> > non-space whitespace and so on. |
59 |
> > |
60 |
> >> EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test |
61 |
> >> [Snip!] |
62 |
> >> |
63 |
> >> case "${EAPI}" in |
64 |
> > |
65 |
> > Er, that thing should go after EAPI check. |
66 |
> > |
67 |
> |
68 |
> Could be, yes. I had thought to set it before the check as |
69 |
> PYTHON_COMPAT itself is assigned (if unset) before the check. |
70 |
|
71 |
Then it should be moved. |
72 |
|
73 |
-- |
74 |
Best regards, |
75 |
Michał Górny |