m4macros, plug-ins: run more accurately the "python2" interpreter.

Our configure test checks the presence of a Python2, but then uses
"python" as interpreter, which is a problem nowadays as the default
python is set to be Python 3 on some distributions (and this will be
more and more the case). So GIMP may end up trying to run our plug-ins
through Python 3 (which would fail) even if Python 2 is present.
Now AM_PATH_PYTHON2() m4 macro will set $PYTHON to a more accurate
Python version as priority.

Similarly let's use "python2" in the binfmt string for extension search.

(cherry picked from commit 03ea9cac54)
This commit is contained in:
Jehan 2018-06-16 01:54:14 +02:00
parent c0cc5abe36
commit 42b13216fc
2 changed files with 4 additions and 3 deletions

View File

@ -35,8 +35,9 @@ AC_DEFUN([AM_PATH_PYTHON2],
dnl Find a Python interpreter. Python versions prior to 2.0 are not
dnl supported. (2.0 was released on October 16, 2000).
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
[python python2 python2.7 dnl
python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
[python2 python2.7 dnl
python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 dnl
python])
AC_ARG_VAR([PYTHON], [the Python interpreter])

View File

@ -156,7 +156,7 @@ install-interp-file:
$(mkinstalldirs) '$(DESTDIR)$(pyinterpdir)'
echo 'python=$(PYBIN_PATH)' > '$(DESTDIR)$(pyinterpfile)'
echo '/usr/bin/python=$(PYBIN_PATH)' >> '$(DESTDIR)$(pyinterpfile)'
echo ':Python:E::py::python:' >> '$(DESTDIR)$(pyinterpfile)'
echo ':Python:E::py::python2:' >> '$(DESTDIR)$(pyinterpfile)'
install-data-local: install-env-file install-interp-file