diff options
author | imarom <imarom@cisco.com> | 2016-03-23 11:55:07 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-03-23 13:01:11 +0200 |
commit | 2bcbca455b063e3ef6f90e85a1fac4994a0e6a51 (patch) | |
tree | 7b7c22e4c1529dd9aeee4401caf504177515c1fc /scripts/find_python.sh | |
parent | 89a2be8247936e2d3d8323c0e51a86c198a879a2 (diff) |
python 3 - regression
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 |