From 59f00264f39dfb95a62401776b4ed8c433682fa7 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Thu, 24 Mar 2016 20:00:27 +0200 Subject: gather stateful client to stf folder, create trex_client package --- scripts/find_python.sh | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'scripts/find_python.sh') diff --git a/scripts/find_python.sh b/scripts/find_python.sh index 929e873d..e9607fe5 100755 --- a/scripts/find_python.sh +++ b/scripts/find_python.sh @@ -24,12 +24,27 @@ function find_python { exit -1 } -if [ -z "$PYTHON" ]; then - # for development here - move us to python 3 for now - if [ "$USER" == "imarom" ] || [ "$USER" == "hhaim" ] || [ "$USER" == "ybrustin" ] || [ "$USER" == "ibarnea" ]; then - PYTHON=/auto/proj-pcube-b/apps/PL-b/tools/python3.4/bin/python3 - else - find_python +function find_python3 { + MACHINE_PYTHON=python3 + ITAY_PYTHON=/auto/proj-pcube-b/apps/PL-b/tools/python3.4/bin/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=$ITAY_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 + echo "*** $PYTHON3 - python version does not match, 3.4 is required" + exit -1 +} + +if [ -z "$PYTHON" ]; then + find_python fi +if [ -z "$PYTHON3" ]; then + find_python3 +fi -- cgit 1.2.3-korg