Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0242256

Browse files
committed
fixup! fixup! Remove redundant Python 2 code
1 parent ca0cc88 commit 0242256

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

installers/win-setup-template.ps1

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ function Get-RegistryVersionFilter {
1010
)
1111

1212
$archFilter = if ($Architecture -eq 'x86') { "32-bit" } else { "64-bit" }
13-
### Python 2.7 x86 have no architecture postfix
14-
if (($Architecture -eq "x86") -and ($MajorVersion -eq 2)) {
15-
"Python $MajorVersion.$MinorVersion.\d+$"
16-
} else {
17-
"Python $MajorVersion.$MinorVersion.*($archFilter)"
18-
}
13+
"Python $MajorVersion.$MinorVersion.*($archFilter)"
1914
}
2015

2116
function Remove-RegistryEntries {
@@ -128,9 +123,7 @@ if ($LASTEXITCODE -ne 0) {
128123
}
129124

130125
Write-Host "Create `python3` symlink"
131-
if ($MajorVersion -ne "2") {
132-
New-Item -Path "$PythonArchPath\python3.exe" -ItemType SymbolicLink -Value "$PythonArchPath\python.exe"
133-
}
126+
New-Item -Path "$PythonArchPath\python3.exe" -ItemType SymbolicLink -Value "$PythonArchPath\python.exe"
134127

135128
Write-Host "Install and upgrade Pip"
136129
$Env:PIP_ROOT_USER_ACTION = "ignore"

0 commit comments

Comments
 (0)