On Thu, 06 Sep 2012 16:42:27 -0400 Ian Stakenvicius <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> - -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
One signature is enough :P.
> On 06/09/12 04:26 PM, Michał Górny wrote:
> > Not that I'm that brilliant to come up with something good but it
> > should start with 'PYTHON_', I think, and be explanatory.
>
> I wanted it to be short -- this is a convenience variable to be used
> in *DEPEND; and since it contains Python Target Use Dependencies, i
> figured the acronym was the best way to go..
>
> PS, '@INTERNAL' is probably not a good tag to set here but i couldn't
> find documentation on what tags were available; if there's a @READONLY
> or @CONSTANT that would be best.
Try looking at the awk script in eclass-manpages/files.
> >> + +mysep= +PTUD= +for impl in ${PYTHON_COMPAT} ; do +
> >> PTUD+="${mysep}python_targets_${impl}?" + mysep="," +done +unset
> >> mysep +
> >
> > Nice hack with that mysep but I don't like it, sorry. I'd rather
> > avoid temporary variables here, or use a function and a 'local'
> > variable. Calling a function in global scope shouldn't be that
> > bad.
> >
> > or just something like:
> >
> > PTUD=${PYTHON_COMPAT// /?,}?
> >
>
> The 'for impl in ${PYTHON_COMPAT}' loop is actually run in global
> scope later, to set *DEPEND on each python implementation; i haven't
> checked but it's possible it can be done there.
Yes, that's a good idea to join loops. Bash is not a C compiler, he
won't do that for ya.
> Also, other bits are already using temp variables in global scope.
And others are also using facebook. Does that mean you really should be
like them?
> Also2, since this var needs to be substituted directly into atoms of
> the ebuild's *DEPEND, imo it needs to be in global scope as well
The variable yes, the mysep doesn't.
> > But then you would have to 'clean up' PYTHON_COMPAT first to avoid
> > non-space whitespace and so on.
> >
> >> EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test
> >> [Snip!]
> >>
> >> case "${EAPI}" in
> >
> > Er, that thing should go after EAPI check.
> >
>
> Could be, yes. I had thought to set it before the check as
> PYTHON_COMPAT itself is assigned (if unset) before the check.
Then it should be moved.
--
Best regards,
Michał Górny
signature.asc
Description: PGP signature
