Merge branch 'release/3.15.x' into feature/OP-4634_Use-qtpy-in-tools

# Conflicts:
#	poetry.lock
This commit is contained in:
Jakub Trllo 2023-01-16 18:09:09 +01:00
commit 782957bd0a
140 changed files with 6915 additions and 4613 deletions

View file

@ -19,7 +19,7 @@ PS> .\create_env.ps1 --verbose
#>
$arguments=$ARGS
$poetry_verbosity=""
$poetry_verbosity=$null
if($arguments -eq "--verbose") {
$poetry_verbosity="-vvv"
}
@ -68,7 +68,7 @@ function Install-Poetry() {
}
$env:POETRY_HOME="$openpype_root\.poetry"
$env:POETRY_VERSION="1.1.15"
# $env:POETRY_VERSION="1.1.15"
(Invoke-WebRequest -Uri https://install.python-poetry.org/ -UseBasicParsing).Content | & $($python) -
}
@ -101,11 +101,11 @@ print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))
Exit-WithCode 1
}
# We are supporting python 3.9 only
if (($matches[1] -lt 3) -or ($matches[2] -lt 9)) {
if (([int]$matches[1] -lt 3) -or ([int]$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 9)) {
} elseif (([int]$matches[1] -eq 3) -and ([int]$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.9" -Color Yellow, White
} else {
@ -179,6 +179,14 @@ if ($LASTEXITCODE -ne 0) {
Set-Location -Path $current_dir
Exit-WithCode 1
}
Write-Color -Text ">>> ", "Installing pre-commit hooks ..." -Color Green, White
& "$env:POETRY_HOME\bin\poetry" run pre-commit install
if ($LASTEXITCODE -ne 0) {
Write-Color -Text "!!! ", "Installation of pre-commit hooks failed." -Color Red, Yellow
Set-Location -Path $current_dir
Exit-WithCode 1
}
$endTime = [int][double]::Parse((Get-Date -UFormat %s))
Set-Location -Path $current_dir
try

View file

@ -109,7 +109,7 @@ detect_python () {
install_poetry () {
echo -e "${BIGreen}>>>${RST} Installing Poetry ..."
export POETRY_HOME="$openpype_root/.poetry"
export POETRY_VERSION="1.1.15"
# export POETRY_VERSION="1.1.15"
command -v curl >/dev/null 2>&1 || { echo -e "${BIRed}!!!${RST}${BIYellow} Missing ${RST}${BIBlue}curl${BIYellow} command.${RST}"; return 1; }
curl -sSL https://install.python-poetry.org/ | python -
}
@ -191,8 +191,10 @@ main () {
# reinstalling them solves the problem.
echo -e "${BIGreen}>>>${RST} Post-venv creation fixes ..."
local openpype_index=$("$POETRY_HOME/bin/poetry" run python "$openpype_root/tools/parse_pyproject.py" tool.poetry.source.0.url)
echo -e "${BIGreen}- ${RST} Using index: ${BIWhite}$openpype_index${RST}"
echo -e "${BIGreen}- ${RST} Using index: ${BIWhite}$openpype_index${RST}"
"$POETRY_HOME/bin/poetry" run python -m pip install --disable-pip-version-check --force-reinstall pip
echo -e "${BIGreen}>>>${RST} Installing pre-commit hooks ..."
"$POETRY_HOME/bin/poetry" run pre-commit install
}
return_code=0