[macos] Remove python2 UnixTools and adjust brew symlinks (#8452)

This commit is contained in:
Shamil Mubarakshin
2023-10-15 20:34:15 +02:00
committed by GitHub
parent 060ad1383a
commit b3b303d294
3 changed files with 17 additions and 16 deletions

View File

@@ -129,7 +129,7 @@ function Get-PipVersion {
[int] $Version
)
$command = If ($Version -eq 2) { "pip --version" } Else { "pip3 --version" }
$command = If ($Version -eq 2) { "/Library/Frameworks/Python.framework/Versions/2.7/bin/pip --version" } Else { "pip3 --version" }
$commandOutput = Run-Command $command
$versionPart1 = $commandOutput | Take-Part -Part 1
$versionPart2 = $commandOutput | Take-Part -Part 4
@@ -192,7 +192,7 @@ function Get-PerlVersion {
}
function Get-PythonVersion {
$pythonVersion = Run-Command "python --version"
$pythonVersion = Run-Command "/Library/Frameworks/Python.framework/Versions/2.7/bin/python --version"
return ($pythonVersion -replace "^Python").Trim()
}