macOS Platform¶
macos
¶
macOS-specific platform implementation.
Handles symlinks, Python detection (Homebrew, pyenv), and admin checks. Long path support is a no-op (macOS has no 260-char limit).
MacOSPlatform
¶
Bases: Platform
macOS platform implementation.
is_admin()
¶
enable_long_paths(log=None)
¶
No-op on macOS — long paths are always supported.
Source code in src/platform/macos.py
detect_python(version='3.13', log=None)
¶
Detect a specific Python version on macOS.
Checks: 1. Homebrew paths (/opt/homebrew/bin/python3.x, /usr/local/bin/python3.x) 2. Versioned binary in PATH (python3.13) 3. python3 binary in PATH
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
version
|
str
|
The version to look for (e.g. "3.13"). |
'3.13'
|
log
|
InstallerLogger | None
|
Optional logger instance. |
None
|
Returns:
| Type | Description |
|---|---|
Path | None
|
Path to python executable, or None. |