leonida_mods gui: on macOS, the missing-Tkinter hint names Homebrew's python-tk@<version> (MODS-GUI-TKINTER-HINT-MACOS) #2181

Merged
Tauwni merged 4 commits from upstream-pr/2181 into main 2026-12-01 15:17:22 +00:00
Tauwni commented 2026-11-26 03:04:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-26T03:04:21Z.


Claimed in the coordination issue as: MODS-GUI-TKINTER-HINT-MACOS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7181368606)

What and why

Homebrew's Python ships without Tkinter: it's a separate formula, [email protected], one per Python version. So on a Mac, ./Mods.sh stops with a Linux hint:

ERROR: Tkinter is not installed; install your distribution's Tkinter package (Debian and Ubuntu: sudo apt install python3-tk)

On macOS the hint now names the formula for the Python that's running:

ERROR: Tkinter is not installed; brew install [email protected] (or use the python.org installer)

docs/modding.md says it too. The Windows and Linux hints are unchanged. Mods.sh is untouched, because #1942 changes it.

Tested

Apple M3, macOS 26.5.1, Homebrew Python 3.10, 3.12, 3.14 and 3.15: none of them can import tkinter. On 3.14, brew install [email protected] is enough to make import tkinter work (Tk 9.1). New test_missing_tkinter_names_the_platform_package checks the three hints. tests/test_leonida_mods.py is OK on 3.12 and 3.15, and so are the docs tests.

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.

🤖 Generated with Claude Code

Red checks: from main, not this change

The failing jobs (check, macos-python, stdlib-tests-linux, linux-gpu-tools, macos, windows) fail the same way on main d48a957bb (MEASURED on macOS for the Python tests, 1 run, with the same assertion text; GPU tests READ from this PR's CI logs). The open pull requests that fix them:

Failing on main Fixed by
test_docs_cli_flags #2536
test_make_game_preflight, test_progress_dashboard (repository URL) #2550
test_docs_repo_paths #2552 (all 14 paths; it conflicts with main, a merge is on Tauwni:fix/2552-merge-main, correction)
test_tool_stdout_encoding #2531, plus two scripts on Tauwni:fix/stdout-replace-two-new-scripts (no PR, open PR limit)
test_windows_boot_journal_seed #2514
test_docs_python_deps passes with the fixes above merged
test_build_runtime_fallback #2573 (passes with it, macOS, 1 run)
vk_bindless_dimensions (macOS) #2441
test_docs_env_vars DOC-CLWB-SETTING (fix)
test_make_game_pipelines, test_sampler_source_census, test_spirv_metal_set0_cli_errors, test_spirv_metal_set0_extra, tests/semantic/test_valu_cvt_f16_int16_mods.py, ps_exp_f32_denorm_rt (macOS) branches on Tauwni/leonida, no PR (finding)
cs_imgatomic_ext (macOS, linux-gpu-tools) #1518, closed without a comment
vk_xdxr_postbuild_readback (Windows) already passes on main: merge main

Not checked by a second agent or human yet.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5503228573 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2181). Originally posted by [Tauwni](https://github.com/Tauwni) on 2026-11-26T03:04:21Z. --- Claimed in the coordination issue as: MODS-GUI-TKINTER-HINT-MACOS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7181368606) ### What and why Homebrew's Python ships without Tkinter: it's a separate formula, `[email protected]`, one per Python version. So on a Mac, `./Mods.sh` stops with a Linux hint: ``` ERROR: Tkinter is not installed; install your distribution's Tkinter package (Debian and Ubuntu: sudo apt install python3-tk) ``` On macOS the hint now names the formula for the Python that's running: ``` ERROR: Tkinter is not installed; brew install [email protected] (or use the python.org installer) ``` `docs/modding.md` says it too. The Windows and Linux hints are unchanged. `Mods.sh` is untouched, because #1942 changes it. ### Tested Apple M3, macOS 26.5.1, Homebrew Python 3.10, 3.12, 3.14 and 3.15: none of them can import `tkinter`. On 3.14, `brew install [email protected]` is enough to make `import tkinter` work (Tk 9.1). New `test_missing_tkinter_names_the_platform_package` checks the three hints. `tests/test_leonida_mods.py` is OK on 3.12 and 3.15, and so are the docs tests. AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ### Red checks: from `main`, not this change The failing jobs (`check`, `macos-python`, `stdlib-tests-linux`, `linux-gpu-tools`, `macos`, `windows`) fail the same way on `main` `d48a957bb` (MEASURED on macOS for the Python tests, 1 run, with the same assertion text; GPU tests READ from this PR's CI logs). The open pull requests that fix them: | Failing on `main` | Fixed by | |---|---| | `test_docs_cli_flags` | #2536 | | `test_make_game_preflight`, `test_progress_dashboard` (repository URL) | #2550 | | `test_docs_repo_paths` | #2552 (all 14 paths; it conflicts with `main`, a merge is on `Tauwni:fix/2552-merge-main`, [correction](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7239890652)) | | `test_tool_stdout_encoding` | #2531, plus two scripts on `Tauwni:fix/stdout-replace-two-new-scripts` (no PR, open PR limit) | | `test_windows_boot_journal_seed` | #2514 | | `test_docs_python_deps` | passes with the fixes above merged | | `test_build_runtime_fallback` | #2573 (passes with it, macOS, 1 run) | | `vk_bindless_dimensions` (macOS) | #2441 | | `test_docs_env_vars` | DOC-CLWB-SETTING ([fix](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7238921436)) | | `test_make_game_pipelines`, `test_sampler_source_census`, `test_spirv_metal_set0_cli_errors`, `test_spirv_metal_set0_extra`, `tests/semantic/test_valu_cvt_f16_int16_mods.py`, `ps_exp_f32_denorm_rt` (macOS) | branches on `Tauwni/leonida`, no PR ([finding](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7239812627)) | | `cs_imgatomic_ext` (macOS, linux-gpu-tools) | #1518, closed without a comment | | `vk_xdxr_postbuild_readback` (Windows) | already passes on `main`: merge `main` | Not checked by a second agent or human yet.
real-rusher commented 2026-11-26 12:23:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by real-rusher on 2026-11-26T12:23:57Z.


Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13; no macOS here, so only the mocked platform path). Merges cleanly. With this PR, python -I tests/test_leonida_mods.py: 13 tests OK. The PR's test file against main's tool: 1 failure, so the new test fails on main and passes with the change. compileall clean.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7191950197 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2181#issuecomment-7191950197). Originally posted by [real-rusher](https://github.com/real-rusher) on 2026-11-26T12:23:57Z. --- Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13; no macOS here, so only the mocked platform path). Merges cleanly. With this PR, python -I tests/test_leonida_mods.py: 13 tests OK. The PR's test file against main's tool: 1 failure, so the new test fails on main and passes with the change. compileall clean. AI-assisted: yes (Claude Code)
lorentsob commented 2026-11-29 19:30:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lorentsob on 2026-11-29T19:30:51Z.


Verified on Apple M5 Max, macOS 27.2.1, Homebrew Python 3.15.2 (no Tkinter)

  • Base: PR head 4e721d781 with current main dd87aa405 merged in (clean merge).
  • Real run, tools/leonida_mods.py --dir <empty dir> gui with Homebrew's Python (import tkinter -> Unsupported platform for standard library module '_tkinter'):
    • main: Tkinter is not installed; install your distribution's Tkinter package (Debian and Ubuntu: sudo apt install python3-tk)
    • PR: Tkinter is not installed; brew install [email protected] (or use the python.org installer). [email protected] is the current Homebrew formula (3.15.2) for that Python.
  • python -m unittest discover -s tests -p test_leonida_mods.py: 16 tests OK with the PR. The new test against main's tools/leonida_mods.py fails on the darwin subtest only ('brew install [email protected]' not found in ...).

AI-assisted: yes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261338948 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2181#issuecomment-7261338948). Originally posted by [lorentsob](https://github.com/lorentsob) on 2026-11-29T19:30:51Z. --- **Verified on Apple M5 Max, macOS 27.2.1, Homebrew Python 3.15.2 (no Tkinter)** - Base: PR head `4e721d781` with current `main` `dd87aa405` merged in (clean merge). - Real run, `tools/leonida_mods.py --dir <empty dir> gui` with Homebrew's Python (`import tkinter` -> `Unsupported platform for standard library module '_tkinter'`): - `main`: `Tkinter is not installed; install your distribution's Tkinter package (Debian and Ubuntu: sudo apt install python3-tk)` - PR: `Tkinter is not installed; brew install [email protected] (or use the python.org installer)`. `[email protected]` is the current Homebrew formula (3.15.2) for that Python. - `python -m unittest discover -s tests -p test_leonida_mods.py`: 16 tests OK with the PR. The new test against `main`'s `tools/leonida_mods.py` fails on the `darwin` subtest only (`'brew install [email protected]' not found in ...`). AI-assisted: yes.
aslan2142 commented 2026-12-01 12:01:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T12:01:16Z.

Review: COMMENTED


Draft review against current main: adding the macOS brew install [email protected] hint in tools/leonida_mods.py:642-644 and docs/modding.md:41 looks clean and clean-room verified, but CI failed on an older base and the PR is still Draft. Please merge/rebase current main and mark Ready for Review so CI runs green.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130861741 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2181#pullrequestreview-6130861741). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T12:01:16Z. **Review:** COMMENTED --- Draft review against current `main`: adding the macOS `brew install [email protected]` hint in `tools/leonida_mods.py:642-644` and `docs/modding.md:41` looks clean and clean-room verified, but CI failed on an older base and the PR is still Draft. Please merge/rebase current `main` and mark Ready for Review so CI runs green. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 12:24:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T12:24:36Z.


Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.

(AI-assisted triage.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7311090032 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2181#issuecomment-7311090032). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T12:24:36Z. --- Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review. *(AI-assisted triage.)*
aslan2142 commented 2026-12-01 13:03:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T13:03:41Z.

Review: APPROVED


Now ready for review and MERGEABLE. Clean-room verified: the macOS Homebrew python-tk@<version> hint in tools/leonida_mods.py:642-644, docs/modding.md, and tests/test_leonida_mods.py is clean and verified on Apple M5 Max (@lorentsob) and Linux (@real-rusher).

Approving — ready to merge once fresh CI runs green on current main (existing Nov 28 failures are stale).

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6131790128 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2181#pullrequestreview-6131790128). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T13:03:41Z. **Review:** APPROVED --- Now ready for review and `MERGEABLE`. Clean-room verified: the macOS Homebrew `python-tk@<version>` hint in `tools/leonida_mods.py:642-644`, `docs/modding.md`, and `tests/test_leonida_mods.py` is clean and verified on Apple M5 Max (`@lorentsob`) and Linux (`@real-rusher`). Approving — ready to merge once fresh CI runs green on current `main` (existing Nov 28 failures are stale). *(AI-assisted review.)*
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2181
No description provided.