Commit 42b13216 authored by Jehan's avatar Jehan

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 03ea9cac)
parent c0cc5abe
......@@ -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).
[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
AC_ARG_VAR([PYTHON], [the Python interpreter])
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment