mirror of
https://github.com/actions/python-versions.git
synced 2025-12-12 13:43:56 +00:00
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:
committed by
GitHub
parent
5c01d17435
commit
d5e8ad6406
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user