Re: [gentoo-dev] [PATCH 1/1] python.eclass: add PYTHON_COMPAT_ALLOW_EXTRA_IMPLS
On Thu, 2020-03-26 at 14:13 -0500, William Hubbs wrote: > This variable is meant to be set in downstream overlays when they need python > implementations other than the ones we support in the tree. > It should be a space-separated list of extra implementations. > > Signed-off-by: William Hubbs > --- > eclass/python-utils-r1.eclass | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass > index aacee5ac35a..4370c7a825f 100644 > --- a/eclass/python-utils-r1.eclass > +++ b/eclass/python-utils-r1.eclass > @@ -43,6 +43,8 @@ _PYTHON_ALL_IMPLS=( > python2_7 > python3_6 python3_7 python3_8 > ) > +[[ -n ${PYTHON_COMPAT_ALLOW_EXTRA_IMPLS[*]} ]] && > + _PYTHON_ALL_IMPLS+=( ${PYTHON_COMPAT_ALLOW_EXTRA_IMPLS} ) > readonly _PYTHON_ALL_IMPLS > > # @ECLASS-VARIABLE: PYTHON_COMPAT_NO_STRICT How is this supposed to work, exactly? If you scroll to the next function you'd realize that after this change this 'extra implementation' will most likely be simultaneously considered supported and unsupported. -- Best regards, Michał Górny signature.asc Description: This is a digitally signed message part
Re: [gentoo-dev] [PATCH 1/1] python.eclass: add PYTHON_COMPAT_ALLOW_EXTRA_IMPLS
On Thu, Mar 26, 2020 at 03:37:48PM -0400, Mike Gilbert wrote: > On Thu, Mar 26, 2020 at 3:13 PM William Hubbs wrote: > > > > This variable is meant to be set in downstream overlays when they need > > python > > implementations other than the ones we support in the tree. > > It should be a space-separated list of extra implementations. > > This new variable should be documented in the eclass, along with a > note that its use is unsupported for general use. > > Do you intend this variable to be set in profiles or make.conf? In > either case, I don't think you can use bash arrays. Also, you're > mixing scalar and array variable syntax in your patch. Sure, I can do that. I'll fix up the syntax and add the documentation. Thanks, William signature.asc Description: Digital signature
Re: [gentoo-dev] [PATCH 1/1] python.eclass: add PYTHON_COMPAT_ALLOW_EXTRA_IMPLS
On Thu, Mar 26, 2020 at 3:13 PM William Hubbs wrote: > > This variable is meant to be set in downstream overlays when they need python > implementations other than the ones we support in the tree. > It should be a space-separated list of extra implementations. This new variable should be documented in the eclass, along with a note that its use is unsupported for general use. Do you intend this variable to be set in profiles or make.conf? In either case, I don't think you can use bash arrays. Also, you're mixing scalar and array variable syntax in your patch.
Re: [gentoo-dev] [PATCH 1/1] python.eclass: add PYTHON_COMPAT_ALLOW_EXTRA_IMPLS
> +[[ -n ${PYTHON_COMPAT_ALLOW_EXTRA_IMPLS[*]} ]] && Without string check: [[ ${#PYTHON_COMPAT_ALLOW_EXTRA_IMPLS[@]} -gt 0 ]] > + _PYTHON_ALL_IMPLS+=( ${PYTHON_COMPAT_ALLOW_EXTRA_IMPLS} ) > readonly _PYTHON_ALL_IMPLS Once array, always array: _PYTHON_ALL_IMPLS+=( ${PYTHON_COMPAT_ALLOW_EXTRA_IMPLS[@]} ) signature.asc Description: This is a digitally signed message part.
[gentoo-dev] [PATCH 1/1] python.eclass: add PYTHON_COMPAT_ALLOW_EXTRA_IMPLS
This variable is meant to be set in downstream overlays when they need python implementations other than the ones we support in the tree. It should be a space-separated list of extra implementations. Signed-off-by: William Hubbs --- eclass/python-utils-r1.eclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index aacee5ac35a..4370c7a825f 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -43,6 +43,8 @@ _PYTHON_ALL_IMPLS=( python2_7 python3_6 python3_7 python3_8 ) +[[ -n ${PYTHON_COMPAT_ALLOW_EXTRA_IMPLS[*]} ]] && + _PYTHON_ALL_IMPLS+=( ${PYTHON_COMPAT_ALLOW_EXTRA_IMPLS} ) readonly _PYTHON_ALL_IMPLS # @ECLASS-VARIABLE: PYTHON_COMPAT_NO_STRICT -- 2.24.1