From a7c75958aa2a0ca4590a75d011f5b682f6505d31 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 7 Dec 2022 16:03:53 -0700 Subject: [PATCH] Default to python 3.8 Signed-off-by: Zack Cerza --- bootstrap | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bootstrap b/bootstrap index 060301d380..385c05768c 100755 --- a/bootstrap +++ b/bootstrap @@ -16,7 +16,16 @@ if [[ "$PYTHON" =~ "python2" ]]; then exit 1 fi -PYTHON=${PYTHON:-"python3"} +# This dance is to keep us from using 3.6, even on systems where it is the OS's +# preferred version. Can be dropped when no teuthology lab in production requires +# an older version. +if [ -z "$PYTHON" ]; then + for i in 10 9 8 7; do + command -v "python3.$i" && PYTHON="python3.$i" && break + done + # This would be bizarre, but I suppose possible + PYTHON=${PYTHON:-"python3"} +fi PYTHON_VER_OUT=$($PYTHON --version) PYTHON_BIN=$(command -v $PYTHON) if [ -z $PYTHON_BIN -o ! -e $PYTHON_BIN -o ! -x $PYTHON_BIN ]; then -- 2.39.5