Skip to content

Commit

Permalink
m4macros, plug-ins: run more accurately the "python2" interpreter.
Browse files Browse the repository at this point in the history
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 03ea9ca)
  • Loading branch information
Jehan committed Jun 16, 2018
1 parent c0cc5ab commit 42b1321
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions m4macros/pythondev.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion plug-ins/pygimp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 42b1321

Please sign in to comment.