Skip to content

Commit

Permalink
fixup! fixup! Remove redundant Python 2 code
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Oct 23, 2024
1 parent ca0cc88 commit 0242256
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions installers/win-setup-template.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 0242256

Please sign in to comment.