From 0963f3b776ac703c6d3c2890cf53bd416b115ed8 Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Tue, 3 Aug 2021 09:07:00 +0200 Subject: [PATCH 1/2] fixed python detection --- tools/create_env.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/create_env.ps1 b/tools/create_env.ps1 index 2ab6abe76e..e2ec401bb3 100644 --- a/tools/create_env.ps1 +++ b/tools/create_env.ps1 @@ -62,9 +62,12 @@ function Test-Python() { Write-Host "Detecting host Python ... " -NoNewline $python = "python" if (Get-Command "pyenv" -ErrorAction SilentlyContinue) { - $python = & pyenv which python + $pyenv_python = & pyenv which python + if (Test-Path -PathType Leaf -Path "$($pyenv_python)") { + $python = $pyenv_python + } } - if (-not (Get-Command "python3" -ErrorAction SilentlyContinue)) { + if (-not (Get-Command $python -ErrorAction SilentlyContinue)) { Write-Host "!!! Python not detected" -ForegroundColor red Set-Location -Path $current_dir Exit-WithCode 1 From e5c8814797f464e7863d94c970305c42a200bebe Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Tue, 3 Aug 2021 10:50:50 +0200 Subject: [PATCH 2/2] removed unused function --- tools/build.ps1 | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tools/build.ps1 b/tools/build.ps1 index e1962ee933..10da3d0b83 100644 --- a/tools/build.ps1 +++ b/tools/build.ps1 @@ -80,17 +80,6 @@ function Show-PSWarning() { } } -function Install-Poetry() { - Write-Host ">>> " -NoNewline -ForegroundColor Green - Write-Host "Installing Poetry ... " - $python = "python" - if (Get-Command "pyenv" -ErrorAction SilentlyContinue) { - $python = & pyenv which python - } - $env:POETRY_HOME="$openpype_root\.poetry" - (Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py -UseBasicParsing).Content | & $($python) - -} - $art = @" . . .. . ..