Launchers: discover versioned Python (SHELL-LAUNCHERS-PYTHON315) #1942

Open
github-bot wants to merge 1 commit from github-bot/gh-1942 into main AGit
Owner

@⁠d6ge-dev on GitHub · 2026-11-25 16:20 UTC · original
d6ge-dev:fix/posix-python-discovery → main · +67 −20 · 4 files · 1 commits · open

Claimed in the coordination issue as: SHELL-LAUNCHERS-PYTHON315 in #1608

What and why

Build.sh and Mods.sh rejected a supported Python installation when python3.15 was the only usable interpreter on PATH. Both launchers now use a shared POSIX helper to discover versioned Python commands and select the highest usable minor version. The helper follows normal PATH precedence for duplicate names and keeps the python3 and python fallbacks.

Tested

  • Reproduced both launcher failures on main with a synthetic PATH and an older python3.
  • python3 -I tests/test_shell_launchers.py passed all 7 tests. The new case covers later minor versions, duplicate names, spaces on PATH, and argument forwarding for both launchers.
  • Shell syntax, git diff --check, and the no-game-data check passed for the changed files.

GPUs tested: n/a (CPU-only launcher tests)

AI-assisted: yes

Checklist

  • Based on current main when prepared.
  • One topic.
  • No game data, keys, or decryption.
**@⁠d6ge-dev** on GitHub · 2026-11-25 16:20 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1942) `d6ge-dev:fix/posix-python-discovery` → `main` · +67 −20 · 4 files · 1 commits · open Claimed in the coordination issue as: `SHELL-LAUNCHERS-PYTHON315` in #1608 ### What and why `Build.sh` and `Mods.sh` rejected a supported Python installation when `python3.15` was the only usable interpreter on `PATH`. Both launchers now use a shared POSIX helper to discover versioned Python commands and select the highest usable minor version. The helper follows normal `PATH` precedence for duplicate names and keeps the `python3` and `python` fallbacks. ### Tested - Reproduced both launcher failures on `main` with a synthetic `PATH` and an older `python3`. - `python3 -I tests/test_shell_launchers.py` passed all 7 tests. The new case covers later minor versions, duplicate names, spaces on `PATH`, and argument forwarding for both launchers. - Shell syntax, `git diff --check`, and the no-game-data check passed for the changed files. GPUs tested: n/a (CPU-only launcher tests) AI-assisted: yes ### Checklist - [x] Based on current `main` when prepared. - [x] One topic. - [x] No game data, keys, or decryption.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:12:12 +00:00
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/1942/head:github-bot/gh-1942'
git switch 'github-bot/gh-1942'

Merge

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