From a3dabc33a37d0460d4a74123f08f47edac007137 Mon Sep 17 00:00:00 2001 From: Lumir Mrkva Date: Sat, 6 Mar 2021 18:34:34 +0100 Subject: [PATCH 1/2] bench support python3.8 binary --- scripts/check_performance.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check_performance.sh b/scripts/check_performance.sh index 40d997a72..7f5e7ed39 100755 --- a/scripts/check_performance.sh +++ b/scripts/check_performance.sh @@ -14,7 +14,7 @@ echo -n "Python version >= 3.8 ..... " # Need python3 command -v python3 >/dev/null 2>&1 || { echo "python3 required. Please install first"; exit 1; } -if ! python3 -c 'import sys; assert sys.version_info >= (3,8)' > /dev/null 2>&1; then +if ! $PYTHON -c 'import sys; assert sys.version_info >= (3,8)' > /dev/null 2>&1; then echo "Python version 3.8 or higher required." exit 1 fi @@ -36,4 +36,4 @@ fi echo # Run the check -python3 .maintain/bench-check/bench_check.py $* +$PYTHON .maintain/bench-check/bench_check.py $* From af81e0fa865b4a6bfa93fa404ce3cf6022f315ca Mon Sep 17 00:00:00 2001 From: Lumir Mrkva Date: Sat, 6 Mar 2021 18:35:06 +0100 Subject: [PATCH 2/2] bench support python3.8 binary --- scripts/check_performance.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/check_performance.sh b/scripts/check_performance.sh index 7f5e7ed39..6204cfc14 100755 --- a/scripts/check_performance.sh +++ b/scripts/check_performance.sh @@ -12,7 +12,13 @@ echo "Prerequisites" echo -n "Python version >= 3.8 ..... " # Need python3 -command -v python3 >/dev/null 2>&1 || { echo "python3 required. Please install first"; exit 1; } +if command -v python3.8 >/dev/null 2>&1 +then + PYTHON=python3.8 +else + PYTHON=python3 +fi +command -v $PYTHON >/dev/null 2>&1 || { echo "python3 required. Please install first"; exit 1; } if ! $PYTHON -c 'import sys; assert sys.version_info >= (3,8)' > /dev/null 2>&1; then echo "Python version 3.8 or higher required."