VirtualBox

Changeset 103276 in vbox


Ignore:
Timestamp:
Feb 8, 2024 12:08:47 PM (12 months ago)
Author:
vboxsync
Message:

Changing the python version detection section

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testboxscript/setup.sh

    r103205 r103276  
    237237    "${TESTBOXSCRIPT_PYTHON}" "${TESTBOXSCRIPT_DIR}/testboxscript/testboxscript.py" --version > /dev/null
    238238    if [ $? -ne 2 ]; then
    239         echo "$0: error: testboxscript.py didn't respons correctly to the --version option."
     239        echo "$0: error: testboxscript.py didn't respond correctly to the --version option."
    240240        exit 1;
    241241    fi
     
    243243    "${TESTBOXSCRIPT_PYTHON}" "${TESTBOXSCRIPT_DIR}/testboxscript/testboxscript_real.py" --version > /dev/null
    244244    if [ $? -ne 2 ]; then
    245         echo "$0: error: testboxscript.py didn't respons correctly to the --version option."
     245        echo "$0: error: testboxscript.py didn't respond correctly to the --version option."
    246246        exit 1;
    247247    fi
     
    670670    MY_PYTHON_VER_TEST="\
    671671import sys;\
    672 x = sys.version_info[0] == 3 or (sys.version_info[0] == 2 and (sys.version_info[1] >= 6 or (sys.version_info[1] == 5 and sys.version_info[2] >= 1)));\
     672x = (sys.version_info[0] == 3 and sys.version_info[1] >= 5) or (sys.version_info[0] == 2 and sys.version_info[1] >= 7);\
    673673sys.exit(not x);\
    674674";
    675     for python in python[2:3].[0:]  #python3.11 python3.10 python3.9 python2.6 python2.5 python;
     675    for python in python3.{30..5} python3 python2.7 python2 python;
    676676    do
    677         python=`which ${python} 2> /dev/null`
     677        # python=`which ${python} 2> /dev/null`
     678        python=`command -v ${python} 2> /dev/null`
    678679        if [ -n "${python}" -a -x "${python}" ]; then
    679680            if ${python} -c "${MY_PYTHON_VER_TEST}"; then
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette