Remove EOL Python code, set 3.9 as base, add 3.14 stdlib module (#317)

* Remove redundant Python 2 code

* Use Python 3.2 as base version

* Use Python 3.3 as base version

* Use Python 3.4 as base version

* Use Python 3.5 as base version

* Use Python 3.6 as base version

* Use Python 3.7 as base version

* Use Python 3.8 as base version

* Use Python 3.9 as base version

* Add annotationlib for Python 3.14

* Fix syntax error
This commit is contained in:
Hugo van Kemenade
2025-04-24 23:29:21 +03:00
committed by GitHub
parent 5c01d17435
commit d5e8ad6406
8 changed files with 39 additions and 155 deletions

View File

@@ -11,12 +11,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 {
@@ -143,9 +138,7 @@ if ($IsFreeThreaded) {
}
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"