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

Open
github-bot wants to merge 3 commits from github-bot/gh-2181 into main AGit
Owner

@⁠Tauwni on GitHub · 2026-11-26 03:04 UTC · original
Tauwni:fix/mods-gui-tkinter-hint-macos → main · +26 −1 · 3 files · 3 commits · draft

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

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

**@⁠Tauwni** on GitHub · 2026-11-26 03:04 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2181) `Tauwni:fix/mods-gui-tkinter-hint-macos` → `main` · +26 −1 · 3 files · 3 commits · draft Claimed in the coordination issue as: MODS-GUI-TKINTER-HINT-MACOS (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### 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)
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 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:21:31 +00:00
Author
Owner

@⁠real-rusher on GitHub · 2026-11-26 12:23 UTC · original

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)

**@⁠real-rusher** on GitHub · 2026-11-26 12:23 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2181#issuecomment-7191950197) 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)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2181/head:github-bot/gh-2181'
git switch 'github-bot/gh-2181'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2181'
git switch 'github-bot/gh-2181'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2181'
git switch 'github-bot/gh-2181'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2181'
git switch 'main'
git merge --squash 'github-bot/gh-2181'
git switch 'main'
git merge --ff-only 'github-bot/gh-2181'
git switch 'main'
git merge 'github-bot/gh-2181'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.