From 0242256f5679fcea1be0f4a7d40467ef6d023d76 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:10:09 +0300 Subject: [PATCH] fixup! fixup! Remove redundant Python 2 code --- installers/win-setup-template.ps1 | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/installers/win-setup-template.ps1 b/installers/win-setup-template.ps1 index e2a33b8b..893e2502 100644 --- a/installers/win-setup-template.ps1 +++ b/installers/win-setup-template.ps1 @@ -10,12 +10,7 @@ function Get-RegistryVersionFilter { ) $archFilter = if ($Architecture -eq 'x86') { "32-bit" } else { "64-bit" } - ### Python 2.7 x86 have no architecture postfix - if (($Architecture -eq "x86") -and ($MajorVersion -eq 2)) { - "Python $MajorVersion.$MinorVersion.\d+$" - } else { - "Python $MajorVersion.$MinorVersion.*($archFilter)" - } + "Python $MajorVersion.$MinorVersion.*($archFilter)" } function Remove-RegistryEntries { @@ -128,9 +123,7 @@ if ($LASTEXITCODE -ne 0) { } Write-Host "Create `python3` symlink" -if ($MajorVersion -ne "2") { - New-Item -Path "$PythonArchPath\python3.exe" -ItemType SymbolicLink -Value "$PythonArchPath\python.exe" -} +New-Item -Path "$PythonArchPath\python3.exe" -ItemType SymbolicLink -Value "$PythonArchPath\python.exe" Write-Host "Install and upgrade Pip" $Env:PIP_ROOT_USER_ACTION = "ignore"