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. --- 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" ) # CPython-specific if [[ ${EPYTHON} == python* ]]; then -- 2.4.6