Skip to content

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

Draft
Tauwni wants to merge 4 commits into
ProjectLeonida:mainfrom
Tauwni:fix/mods-gui-tkinter-hint-macos
Draft

Tauwni wants to merge 4 commits into
ProjectLeonida:mainfrom
Tauwni:fix/mods-gui-tkinter-hint-macos

Conversation

@Tauwni

@Tauwni Tauwni commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: MODS-GUI-TKINTER-HINT-MACOS (#1608 (comment))

What and why

Homebrew's Python ships without Tkinter: it's a separate formula, python-tk@3.N, 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 python-tk@3.12 (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 python-tk@3.14 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.

… python-tk@<version>

Homebrew's Python ships without Tkinter, so ./Mods.sh on a Mac stopped with the Debian hint (sudo apt install
python3-tk). The hint now names the formula for the running version; docs/modding.md says it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@real-rusher

Copy link
Copy Markdown
Contributor

Verified on main a73a57e (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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants