File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ MIN_PYTHON_VERSION=" 3.8"
4+
35set -o pipefail
46
57if pip --version 2>&1 | egrep -q ' python 3\..*' > /dev/null 2>&1 ; then
@@ -280,6 +282,14 @@ check_key() {
280282 fi
281283}
282284
285+ check_python_version () {
286+ VERSION=` $PYTHON --version | awk ' {print $2}' `
287+ FIRST=` echo -e " $VERSION \n$MIN_PYTHON_VERSION " | sort -V| head -n 1`
288+ if [ " $FIRST " == " $VERSION " ]; then
289+ echo " Error: PSI/J requires Python $MIN_PYTHON_VERSION or above. Your current version is $VERSION ."
290+ exit 2
291+ fi
292+ }
283293
284294not_cached () {
285295 if [ ! -d .packages ]; then
@@ -342,6 +352,8 @@ while [ "$1" != "" ]; do
342352 shift
343353done
344354
355+ check_python_version
356+
345357MYPATH=" $( cd -- " $( dirname " $0 " ) " > /dev/null 2>&1 ; pwd -P ) "
346358cd " $MYPATH "
347359
You can’t perform that action at this time.
0 commit comments