mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#4007
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/2365
Author: @nekomario28
Created: 10/14/2026
Status: ❌ Closed
Base:
main← Head:setup-mac-source-flag📝 Commits (1)
4822db6setup: honour --source on a Mac, whose hand-over skips setup.py's parser (#2363)📊 Changes
2 files changed (+32 additions, -0 deletions)
View changed files
📝
metal/setup_mac.py(+8 -0)📝
tools/test_setup_mac.py(+24 -0)📄 Description
Closes #2363.
On a Mac
setup.pyhands over tometal/setup_mac.pybefore its own parser runs, so the--sourceflag that setsSTRATA_SOURCEis never seen;setup_mac.py's parser did not define it either, so it landed inparse_known_args' leftovers and was dropped — right after the failed download had recommended it:--sourceis now defined in the Mac parser and setsSTRATA_SOURCE, exactly assetup.pydoes (choices=SOURCES, same help). The environment variable already worked on a Mac; the documented flag does now too.Testing
python -m unittest tools.test_setup_mac— the new case drivesmain(["--source","modelscope","--yes","--check","--data-dir",<tmp>])with the Mac checks mocked the way the rest of that file does (sysctl/sw_vers/xcode-select; no GPU, no network), and requiresSTRATA_SOURCEto be set and nonot used on a Macwarning for--source.OK.os.environline removed:AssertionError: None != 'modelscope'.The other
tools/test_setup_*.pymodules behave as before (test_setup_engine_hashandtest_setup_goldenfail identically in this checkout without this change).The hand-over itself is untouched: the Mac parser still owns the Mac argv, it just knows this one flag now.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.