diff --git a/tools/build.sh b/tools/build.sh index 79fb748cd5..b5aa22dfc0 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -90,7 +90,7 @@ done ############################################################################### detect_python () { echo -e "${BIGreen}>>>${RST} Using python \c" - command -v python >/dev/null 2>&1 || { echo -e "${BIRed}- NOT FOUND${RST} ${BIYellow}You need Python 3.7 installed to continue.${RST}"; return 1; } + command -v python >/dev/null 2>&1 || { echo -e "${BIRed}- NOT FOUND${RST} ${BIYellow}You need Python 3.9 installed to continue.${RST}"; return 1; } local version_command version_command="import sys;print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))" local python_version @@ -99,9 +99,9 @@ detect_python () { IFS=. set -- $python_version IFS="$oIFS" - if [ "$1" -ge "3" ] && [ "$2" -ge "6" ] ; then - if [ "$2" -gt "7" ] ; then - echo -e "${BIWhite}[${RST} ${BIRed}$1.$2 ${BIWhite}]${RST} - ${BIRed}FAILED${RST} ${BIYellow}Version is new and unsupported, use${RST} ${BIPurple}3.7.x${RST}"; return 1; + if [ "$1" -ge "3" ] && [ "$2" -ge "9" ] ; then + if [ "$2" -gt "9" ] ; then + echo -e "${BIWhite}[${RST} ${BIRed}$1.$2 ${BIWhite}]${RST} - ${BIRed}FAILED${RST} ${BIYellow}Version is new and unsupported, use${RST} ${BIPurple}3.9.x${RST}"; return 1; else echo -e "${BIWhite}[${RST} ${BIGreen}$1.$2${RST} ${BIWhite}]${RST}" fi diff --git a/tools/build_win_installer.ps1 b/tools/build_win_installer.ps1 index b9d1ca2d3f..6549e57117 100644 --- a/tools/build_win_installer.ps1 +++ b/tools/build_win_installer.ps1 @@ -131,15 +131,15 @@ if(-not $m) { Set-Location -Path $current_dir Exit-WithCode 1 } -# We are supporting python 3.7 only -if (($matches[1] -lt 3) -or ($matches[2] -lt 7)) { +# We are supporting python 3.9 +if (($matches[1] -lt 3) -or ($matches[2] -lt 9)) { Write-Host "FAILED Version [ $p ] is old and unsupported" -ForegroundColor red Set-Location -Path $current_dir Exit-WithCode 1 -} elseif (($matches[1] -eq 3) -and ($matches[2] -gt 7)) { +} elseif (($matches[1] -eq 3) -and ($matches[2] -gt 9)) { Write-Host "WARNING Version [ $p ] is unsupported, use at your own risk." -ForegroundColor yellow Write-Host "*** " -NoNewline -ForegroundColor yellow - Write-Host "OpenPype supports only Python 3.7" -ForegroundColor white + Write-Host "OpenPype supports only Python 3.9" -ForegroundColor white } else { Write-Host "OK [ $p ]" -ForegroundColor green } diff --git a/tools/create_env.ps1 b/tools/create_env.ps1 index 3f956e5c6a..ea38ae4745 100644 --- a/tools/create_env.ps1 +++ b/tools/create_env.ps1 @@ -99,14 +99,14 @@ print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1])) Set-Location -Path $current_dir Exit-WithCode 1 } - # We are supporting python 3.7 only - if (($matches[1] -lt 3) -or ($matches[2] -lt 7)) { + # We are supporting python 3.9 only + if (($matches[1] -lt 3) -or ($matches[2] -lt 9)) { Write-Color -Text "FAILED ", "Version ", "[", $p ,"]", "is old and unsupported" -Color Red, Yellow, Cyan, White, Cyan, Yellow Set-Location -Path $current_dir Exit-WithCode 1 - } elseif (($matches[1] -eq 3) -and ($matches[2] -gt 7)) { + } elseif (($matches[1] -eq 3) -and ($matches[2] -gt 9)) { Write-Color -Text "WARNING Version ", "[", $p, "]", " is unsupported, use at your own risk." -Color Yellow, Cyan, White, Cyan, Yellow - Write-Color -Text "*** ", "OpenPype supports only Python 3.7" -Color Yellow, White + Write-Color -Text "*** ", "OpenPype supports only Python 3.9" -Color Yellow, White } else { Write-Color "OK ", "[", $p, "]" -Color Green, Cyan, White, Cyan } diff --git a/tools/create_env.sh b/tools/create_env.sh index fba3942b87..ae27370227 100755 --- a/tools/create_env.sh +++ b/tools/create_env.sh @@ -88,16 +88,16 @@ done ############################################################################### detect_python () { echo -e "${BIGreen}>>>${RST} Using python \c" - command -v python >/dev/null 2>&1 || { echo -e "${BIRed}- NOT FOUND${RST} ${BIYellow}You need Python 3.7 installed to continue.${RST}"; return 1; } + command -v python >/dev/null 2>&1 || { echo -e "${BIRed}- NOT FOUND${RST} ${BIYellow}You need Python 3.9 installed to continue.${RST}"; return 1; } local version_command="import sys;print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))" local python_version="$(python <<< ${version_command})" oIFS="$IFS" IFS=. set -- $python_version IFS="$oIFS" - if [ "$1" -ge "3" ] && [ "$2" -ge "6" ] ; then - if [ "$2" -gt "7" ] ; then - echo -e "${BIWhite}[${RST} ${BIRed}$1.$2 ${BIWhite}]${RST} - ${BIRed}FAILED${RST} ${BIYellow}Version is new and unsupported, use${RST} ${BIPurple}3.7.x${RST}"; return 1; + if [ "$1" -ge "3" ] && [ "$2" -ge "9" ] ; then + if [ "$2" -gt "9" ] ; then + echo -e "${BIWhite}[${RST} ${BIRed}$1.$2 ${BIWhite}]${RST} - ${BIRed}FAILED${RST} ${BIYellow}Version is new and unsupported, use${RST} ${BIPurple}3.9.x${RST}"; return 1; else echo -e "${BIWhite}[${RST} ${BIGreen}$1.$2${RST} ${BIWhite}]${RST}" fi