Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.
C++
setup: a Mac with an Intel (Rosetta) Python is still an Apple Silicon Mac; the chip name and hw.optional.arm64 decide, one plain line says the Python is an Intel build (#3894); test
Niko1221d924beffe5ae
diff --git a/setup.py b/setup.pyindex f3689cac0..d65c16085 100644--- a/setup.py+++ b/setup.py@@ -8249,6 +8249,9 @@ def mac_control_setup(a) -> int:info = MF.mac_info()ram = float(info["ram_gb"] or ram_gb())ok(f"{info['chip']}, {ram:.0f} GB unified memory, macOS {info['macos'] or '?'}")+ if info.get("rosetta_python"):+ say(" (the Python that runs this is an Intel build running through Rosetta: Strata works, and the Apple Silicon Python "+ "from python.org or Homebrew in /opt/homebrew is a little faster to start)")problems = MF.mac_problems(info, need_compiler=False) # the app compiles nothing: no Command Line Tools neededfor p in problems:warn(p)diff --git a/strata_control/mac_fit.py b/strata_control/mac_fit.pyindex 68a7b1063..a273c7416 100644--- a/strata_control/mac_fit.py+++ b/strata_control/mac_fit.py@@ -94,7 +94,11 @@ def mac_info(run=subprocess.run) -> dict:clt_path = clt.stdout.strip() if clt.returncode == 0 else ""except (OSError, subprocess.SubprocessError):clt_path = ""- return {"chip": chip, "ram_gb": ram, "macos": ver, "arm64": platform.machine() == "arm64",+ # platform.machine() is the PYTHON's build: an Intel Python running through Rosetta says x86_64 on an M1 Max (#3894). The chip name+ # (Rosetta passes "Apple M1 Max" through) and hw.optional.arm64 say what the Mac is.+ python_arm = platform.machine() == "arm64"+ mac_arm = python_arm or _sysctl("hw.optional.arm64", run) == "1" or chip.startswith("Apple")+ return {"chip": chip, "ram_gb": ram, "macos": ver, "arm64": mac_arm, "rosetta_python": mac_arm and not python_arm,"clt": clt_path, "perf_cores": int(_sysctl("hw.perflevel0.physicalcpu", run) or 0)}diff --git a/tools/test_setup_mac.py b/tools/test_setup_mac.pyindex fd0b5a95e..92f2a596b 100644--- a/tools/test_setup_mac.py+++ b/tools/test_setup_mac.py@@ -49,6 +49,13 @@ class MacCheck(unittest.TestCase):self.assertTrue(info["clt"])self.assertEqual(M.mac_problems(info), [])+ def test_an_intel_python_on_apple_silicon_is_still_an_apple_silicon_mac(self): # #3894+ with mock.patch.object(M.platform, "machine", return_value="x86_64"):+ info = M.mac_info(fake_run({**M5, "machdep.cpu.brand_string": "Apple M1 Max"}))+ self.assertTrue(info["arm64"])+ self.assertTrue(info["rosetta_python"])+ self.assertNotIn("Intel", " ".join(M.mac_problems(info)))+def test_intel_old_macos_and_missing_tools_are_named(self):with mock.patch.object(M.platform, "machine", return_value="x86_64"):info = M.mac_info(fake_run({**M5, "macos": "14.6", "machdep.cpu.brand_string": "Intel Core i9"}, clt_rc=2))