mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3405] [CLOSED] [Other] macOS setup: install cmake and ninja before a compile #4619
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4619
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3405
Author: @Flo5k5
Created: 10/20/2026
Status: ❌ Closed
Base:
main← Head:fix-mac-build-tools📝 Commits (1)
3c316c7[Other] macOS setup: install cmake and ninja before a compile📊 Changes
3 files changed (+64 additions, -7 deletions)
View changed files
📝
docs/MAC.md(+2 -2)📝
metal/setup_mac.py(+21 -5)📝
tools/test_setup_mac.py(+41 -0)📄 Description
Problem and result
Fixes #3403. Since
a242537movedcmakeandninjatorequirements-build.txt,./setup.shon a Mac no longer installs them:metal/setup_mac.pystill installs onlyrequirements.txtand expects the build tools to come with it. On a fresh.venvwithoutninjaonPATH, the Metal engine build stops at CMake's'ninja' '--version'.With this change, the engine and image encoder builds install the missing pinned helpers from
requirements-build.txtinto.venvfirst, and then build.Related discussion
#3403 (focused fix, no change of defaults)
Approach
build_tools()inmetal/setup_mac.pydoes whatsetup.py'scmake_build()already does on a PC: it looks for each helper onPATHor next to the venv's Python (find_tool), installs only the missing pins withpip_install, and fails with the same workaround message if they are still not there. It runs right before a compile (build_engine,build_vision), and not when the engine is current, so the runtime install stays free of the build helpers, asa242537intended. Acmakeorninjaalready onPATH(Homebrew, for example) is used as before. The step 3 message, the module docstring anddocs/MAC.mdno longer say that step 3 installs cmake and ninja.Validation
Passed:
python -m unittest tools.test_setup_macon3c316c7(macOS 27.0.1, Python 3.15.0): 28 tests OK. The 4 newBuildToolstests check that a fresh venv gets both pins, that only the missing helper is installed, thatrequirements.txtcarries neither, and that both builds callbuild_tools()before anything else. On 9ae93f7'ssetup_mac.py, 3 of them fail (nobuild_tools)..venv,./setup.sh --update --yes(llama.cppandmetal-cppcopied intothird_party/from an existing checkout at the same pins,STRATA_SETTINGS_FILEand--data-dirpointed at a scratch folder):9ae93f7,ninjanot onPATH, HomebrewcmakeonPATH: fails,build-metal/build.logas in #3403 ('ninja' '--version'...no such file or directory).PATH: step 4 installsninja==1.13.2only and buildsbuild-metal/strata.3c316c7(this PR),PATHreduced to/usr/bin:/bin:/usr/sbin:/sbinplus apython3link, so neithercmakenorninja: step 4 installscmake==4.4.3 ninja==1.13.2and buildsbuild-metal/strata. A second run reportsMetal engine: ... (built for this source)and installs nothing.Failed:
None observed.
Not run:
build_vision()on hardware:--updatereturns before the image encoder step. Only the unit test covers its call tobuild_tools().metal/setup_mac.py,tools/test_setup_mac.pyanddocs/MAC.mdchange).Limits
An older
.venvthat already has cmake and ninja behaves as before. The desktop app's Control mode does not runsetup_mac.py(its test asserts it), so it is not affected.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.