feat(macos): add native Homebrew install path #14

Merged
enderofwings merged 4 commits from fix/macos-doc-cleanup into main 2026-08-26 19:06:26 +00:00
Showing only changes of commit 214ce07d1f - Show all commits
+33
View File
@@ -0,0 +1,33 @@
"""Platform guards for the community-supported native macOS install path."""
from __future__ import annotations
import importlib.util
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
SPEC = importlib.util.spec_from_file_location("nexus_sync_macos_test", ROOT / "bin" / "sync.py")
assert SPEC and SPEC.loader
sync = importlib.util.module_from_spec(SPEC)
SPEC.loader.exec_module(sync)
def test_darwin_uses_gpu_agnostic_requirements(monkeypatch):
monkeypatch.setattr(sync.os, "name", "posix")
monkeypatch.setattr(sync.sys, "platform", "darwin")
assert sync.requirements() == "requirements-base.txt"
def test_linux_provisioning_stages_are_skipped_on_darwin(monkeypatch):
monkeypatch.setattr(sync.sys, "platform", "darwin")
def unexpected_run(*args, **kwargs):
raise AssertionError(f"Linux provisioning ran on macOS: {args!r}")
monkeypatch.setattr(sync.subprocess, "run", unexpected_run)
sync.linux_stage("restore-linux.sh", "packages")
def test_macos_installer_is_in_the_shell_parse_gate():
gate = (ROOT / "bin" / "check.sh").read_text(encoding="utf-8")
assert "install-macos.sh" in gate