[gimp/meson: 600/805] Prefer python2 to python that may point on python3 on modern installs.



commit a61dcadd921cf609e3adf614ab315cdc9a1a53ae
Author: Félix Piédallu <felix piedallu me>
Date:   Wed Jan 10 13:38:36 2018 +0100

    Prefer python2 to python that may point on python3 on modern installs.

 plug-ins/pygimp/py-compile |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/pygimp/py-compile b/plug-ins/pygimp/py-compile
index 0b31270..a782167 100755
--- a/plug-ins/pygimp/py-compile
+++ b/plug-ins/pygimp/py-compile
@@ -2,7 +2,12 @@
 # called as "py-compile [--basedir DIR] PY_FILES ...
 
 if [ -z "$PYTHON" ]; then
-    PYTHON=python
+    if [[ -x "$(command -v python2)" ]]; then
+        PYTHON=python2
+    else
+        # Let's hope it's Python2
+        PYTHON=python
+    fi
 fi
 
 basedir=


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]