diff options
Diffstat (limited to 'scripts/find_python.sh')
-rwxr-xr-x | scripts/find_python.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/find_python.sh b/scripts/find_python.sh index 9552260b..aba2d936 100755 --- a/scripts/find_python.sh +++ b/scripts/find_python.sh @@ -24,7 +24,21 @@ function find_python { exit -1 } +function find_python3 { + MACHINE_PYTHON=python3 + PYTHON3=$MACHINE_PYTHON + PCHECK=`$PYTHON3 -c "import sys; ver = sys.version_info[0] * 10 + sys.version_info[1];sys.exit(ver != 34)"` + if [ $? -eq 0 ]; then + return + fi + PYTHON3= + +} + if [ -z "$PYTHON" ]; then find_python fi +if [ -z "$PYTHON3" ]; then + find_python3 +fi |