From a435326692495e751970ee5fe83376cb88de72fc Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Fri, 6 Oct 2023 12:24:49 -0700 Subject: [PATCH] Updating --- python-setup/install_tools.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python-setup/install_tools.ps1 b/python-setup/install_tools.ps1 index ad50fb3b7..b6675bcb0 100644 --- a/python-setup/install_tools.ps1 +++ b/python-setup/install_tools.ps1 @@ -1,5 +1,15 @@ #! /usr/bin/pwsh +# If we are running greater than or equal to python 3.12, add src to the python path +Write-Host "Checking python version" +Write-Host "PYTHONPATH $Env:PYTHONPATH" +if ((py -3 -c "import sys; print(0 if sys.version_info >= (3, 12) else 1)") -eq "0") { + Write-Host "Python 3.12+ detected, setting PY_PYTHON3=3.11" + Write-Output "PY_PYTHON3=3.11" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append +} else { + Write-Host "Python 3.12+ not detected, not PY_PYTHON3" +} + py -2 -m pip install --user --upgrade pip setuptools wheel py -3 -m pip install --user --upgrade pip setuptools wheel