diff --git a/images/macos/scripts/build/install-python.sh b/images/macos/scripts/build/install-python.sh index 3fa93b27a..75d870004 100644 --- a/images/macos/scripts/build/install-python.sh +++ b/images/macos/scripts/build/install-python.sh @@ -38,7 +38,7 @@ if is_Veertu; then fi echo "Brew Installing Python 3" -brew_smart_install "python@3.11" +brew_smart_install "python@3.12" echo "Installing pipx" export PIPX_BIN_DIR=/usr/local/opt/pipx_bin diff --git a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 index c982e8efb..ce141bbe5 100644 --- a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 +++ b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 @@ -61,12 +61,12 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { $languageAndRuntime.AddToolVersion("Python", $(Get-PythonVersion)) } -if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) { - $languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version)) -} +$languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version)) + if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsBigSur)) { $languageAndRuntime.AddToolVersion("R", $(Get-RVersion)) } + $languageAndRuntime.AddToolVersion("Ruby", $(Get-RubyVersion)) # Package Management @@ -87,10 +87,8 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) { $packageManagement.AddToolVersion("Pip", $(Get-PipVersion -Version 2)) } -if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) { - $packageManagement.AddToolVersion("Pip3", $(Get-PipVersion -Version 3)) - $packageManagement.AddToolVersion("Pipx", $(Get-PipxVersion)) -} +$packageManagement.AddToolVersion("Pip3", $(Get-PipVersion -Version 3)) +$packageManagement.AddToolVersion("Pipx", $(Get-PipxVersion)) $packageManagement.AddToolVersion("RubyGems", $(Get-RubyGemsVersion)) if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64) -and (-not $os.IsSonoma)) { diff --git a/images/macos/scripts/tests/Python.Tests.ps1 b/images/macos/scripts/tests/Python.Tests.ps1 index c60d57082..4179d6233 100644 --- a/images/macos/scripts/tests/Python.Tests.ps1 +++ b/images/macos/scripts/tests/Python.Tests.ps1 @@ -3,13 +3,19 @@ Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking $os = Get-OSVersion -Describe "Python3" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64) { +Describe "Python3" { It "Python 3 is available" { "python3 --version" | Should -ReturnZeroExitCode } - - It "Python 3 is installed under /usr/local/bin" { - Get-ToolPath "python3" | Should -BeLike "/usr/local/bin*" + + if ($os.IsVenturaArm64 -or $os.IsSonomaArm64) { + It "Python 3 is installed under /opt/homebrew/bin/" { + Get-ToolPath "python3" | Should -BeLike "/opt/homebrew/bin/*" + } + } else { + It "Python 3 is installed under /usr/local/bin" { + Get-ToolPath "python3" | Should -BeLike "/usr/local/bin*" + } } It "Pip 3 is available" { diff --git a/images/macos/templates/macOS-13.arm64.anka.pkr.hcl b/images/macos/templates/macOS-13.arm64.anka.pkr.hcl index be53d27a6..858b4873f 100644 --- a/images/macos/templates/macOS-13.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-13.arm64.anka.pkr.hcl @@ -204,6 +204,7 @@ build { "${path.root}/../scripts/build/install-powershell.sh", "${path.root}/../scripts/build/install-mono.sh", "${path.root}/../scripts/build/install-dotnet.sh", + "${path.root}/../scripts/build/install-python.sh", "${path.root}/../scripts/build/install-azcopy.sh", "${path.root}/../scripts/build/install-openssl.sh", "${path.root}/../scripts/build/install-ruby.sh", diff --git a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl index 693fbae36..750b55387 100644 --- a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl @@ -204,6 +204,7 @@ build { "${path.root}/../scripts/build/install-powershell.sh", "${path.root}/../scripts/build/install-mono.sh", "${path.root}/../scripts/build/install-dotnet.sh", + "${path.root}/../scripts/build/install-python.sh", "${path.root}/../scripts/build/install-azcopy.sh", "${path.root}/../scripts/build/install-openssl.sh", "${path.root}/../scripts/build/install-ruby.sh",