Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[macOS] Update Python installer script
  • Loading branch information
erik-bershel committed Oct 10, 2025
commit dcadb8c7e75abdb0e019ab9d81830de53bc9c98b
17 changes: 14 additions & 3 deletions images/macos/scripts/build/install-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@ echo "Installing Python Tooling"
# Close Finder window
close_finder_window

echo "Brew Installing Python 3"
brew_smart_install "python@3.12"

# Installing latest Homebrew Python 3 to handle python3 and pip3 symlinks
# When latest Python3 is installed as a dependencies for other packages
# it does not create /usr/local/bin/python3 and /usr/local/bin/pip3
echo "Brew Installing default Python 3"
brew_smart_install "python"

# Install specific Python version
# Create symlinks for python3 and pip3 to point to the specific version
toolsetVersion=$(get_toolset_value '.python.default')
echo "Installing Python $toolsetVersion"
brew_smart_install "python@$toolsetVersion"
brew link python@$toolsetVersion --force --overwrite

# Pipx has it's own Python dependency
echo "Installing pipx"

if is_Arm64; then
Expand Down
2 changes: 1 addition & 1 deletion images/macos/scripts/tests/Python.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Describe "Python3" {
}
} else {
It "Python 3 is installed under /usr/local/bin" {
Get-ToolPath "python3" | Should -BeLike "/usr/local/bin*"
Get-ToolPath "python3" | Should -BeLike "/usr/local/bin/*"
}
}

Expand Down
3 changes: 3 additions & 0 deletions images/macos/toolsets/toolset-14.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@
"fastlane"
]
},
"python": {
"default": "3.13"
},
"toolcache": [
{
"name": "Python",
Expand Down
3 changes: 3 additions & 0 deletions images/macos/toolsets/toolset-15.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@
"fastlane"
]
},
"python": {
"default": "3.13"
},
"toolcache": [
{
"name": "Python",
Expand Down
3 changes: 3 additions & 0 deletions images/macos/toolsets/toolset-26.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@
"fastlane"
]
},
"python": {
"default": "3.13"
},
"toolcache": [
{
"name": "Python",
Expand Down