On Sat, Jul 25, 2015 at 12:37:43PM +0200, Michał Górny wrote:
> Ban calling python3{,-config} when python2 is used, and the other way
> around. While this will not prevent configure scripts from finding the
> other Python version, it will cause them to fail eventually trying to
> use it. Currently those attempt were able to pass through thanks to
> python-config providing python{2,3} symlinks.

you mean eselect providing.

> ---
>  eclass/python-utils-r1.eclass | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
> index 69d3262..2584f3e 100644
> --- a/eclass/python-utils-r1.eclass
> +++ b/eclass/python-utils-r1.eclass
> @@ -847,11 +847,13 @@ python_wrapper_setup() {
>               local EPYTHON PYTHON
>               python_export "${impl}" EPYTHON PYTHON
>  
> -             local pyver
> +             local pyver pyother
>               if python_is_python3; then
>                       pyver=3
> +                     pyother=2
>               else
>                       pyver=2
> +                     pyother=3
>               fi
>  
>               # Python interpreter
> @@ -865,7 +867,7 @@ python_wrapper_setup() {
>               cp "${workdir}/bin/python" "${workdir}/bin/python${pyver}" || 
> die
>               chmod +x "${workdir}/bin/python" 
> "${workdir}/bin/python${pyver}" || die
>  
> -             local nonsupp=()
> +             local nonsupp=( "python${pyother}" "python${pyother}-config" )

I have had basically this exact patch locally for a few days since we
talked about it and it hasnt been a problem yet but is not very much
testing. I was wondering if perhaps this should be a qawarn for a while
first instead of banning immediately?

>               # CPython-specific
>               if [[ ${EPYTHON} == python* ]]; then
> -- 
> 2.4.6

Reply via email to