[gimp/meson: 4/9] Fix Python file : Prefer python2 to python that may point on python3 on modern installs.



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

    Fix Python file : 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]