feat: give the package command back in hints

Run from the retrobios package, a hint and --help named python3 install.py, a file that user does not have. The package's launcher sets RETROBIOS_BOOTSTRAP=pypi, and the command is read from the environment it runs in: uvx retrobios from uv's cache, pipx run retrobios from pipx's, retrobios once installed.
This commit is contained in:
Abdessamad Derraz committed 2026-11-09 19:04:08 +01:00
1 parent 6c14468862
commit b067d27d53
8 files changed
+75 -13

No files matched your search

+3
View File
@@ -44,6 +44,7 @@ MODULE = "retrobios"
# keeps the exit codes it gives a reader that left (141) and Ctrl+C (130).
LAUNCHER = '''"""The RetroBIOS installer, install.py, run as the retrobios command."""
import os
import runpy
from pathlib import Path
@@ -51,6 +52,8 @@ __version__ = "{version}"
def main() -> None:
# The hints give back the command that ran this, not python3 install.py.
os.environ["RETROBIOS_BOOTSTRAP"] = "pypi"
runpy.run_path(str(Path(__file__).with_name("install.py")), run_name="__main__")
'''