1 |
Ban calling python3{,-config} when python2 is used, and the other way |
2 |
around. While this will not prevent configure scripts from finding the |
3 |
other Python version, it will cause them to fail eventually trying to |
4 |
use it. Currently those attempt were able to pass through thanks to |
5 |
python-config providing python{2,3} symlinks. |
6 |
--- |
7 |
eclass/python-utils-r1.eclass | 6 ++++-- |
8 |
1 file changed, 4 insertions(+), 2 deletions(-) |
9 |
|
10 |
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass |
11 |
index 69d3262..2584f3e 100644 |
12 |
--- a/eclass/python-utils-r1.eclass |
13 |
+++ b/eclass/python-utils-r1.eclass |
14 |
@@ -847,11 +847,13 @@ python_wrapper_setup() { |
15 |
local EPYTHON PYTHON |
16 |
python_export "${impl}" EPYTHON PYTHON |
17 |
|
18 |
- local pyver |
19 |
+ local pyver pyother |
20 |
if python_is_python3; then |
21 |
pyver=3 |
22 |
+ pyother=2 |
23 |
else |
24 |
pyver=2 |
25 |
+ pyother=3 |
26 |
fi |
27 |
|
28 |
# Python interpreter |
29 |
@@ -865,7 +867,7 @@ python_wrapper_setup() { |
30 |
cp "${workdir}/bin/python" "${workdir}/bin/python${pyver}" || die |
31 |
chmod +x "${workdir}/bin/python" "${workdir}/bin/python${pyver}" || die |
32 |
|
33 |
- local nonsupp=() |
34 |
+ local nonsupp=( "python${pyother}" "python${pyother}-config" ) |
35 |
|
36 |
# CPython-specific |
37 |
if [[ ${EPYTHON} == python* ]]; then |
38 |
-- |
39 |
2.4.6 |