Most people who want MeshTerm have a radio and a terminal, not a Python toolchain. This is the install for them: one file, download it, run it. `packaging/meshterm.spec` freezes the app with PyInstaller in console mode — which is not a detail, since a windowed build of a terminal program starts with nowhere to draw and exits. The assets land at `meshterm/assets` inside the bundle so that `Path(__file__).parent.parent / "assets"` keeps resolving exactly as it does in a checkout, and bleak's per-platform backends are named as hidden imports because nothing static ever sees the one that actually gets used. UPX is off: a few megabytes are not worth being flagged by antivirus on a first release. The build was run here rather than only written. The Windows executable comes out at 14 MB, runs from a directory with no source tree in sight, and draws the specimen card — which is the real test, because the specimen reads the asset files. `installers.yml` does the same on five machines, because frozen builds cannot be cross-compiled. Windows, macOS on both Apple silicon and Intel (plenty of people still have one, and an arm64 build will not run for them), and Linux on x64 and ARM64 — the last for the uConsole. Each leg runs the binary from a temporary directory before uploading it, so a build that only works beside its own source fails on the runner instead of on somebody's laptop, and each one gets a checksum written beside it. It publishes nothing; attaching these to a release stays a separate decision. Also here: `meshterm --help` now opens with the same sentence as the package summary, rather than a fourth description of the project written in its own way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
23 lines
752 B
Python
23 lines
752 B
Python
"""Launcher for the frozen builds.
|
|
|
|
PyInstaller freezes a *script*, not a console-script entry point, so this is the script:
|
|
it does what the ``meshterm`` command does and nothing else. Kept in ``packaging/``
|
|
rather than in the package, because it exists for the installers and has no business
|
|
being importable.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import multiprocessing
|
|
import sys
|
|
|
|
if __name__ == "__main__":
|
|
# Windows and macOS spawn child processes by re-running this executable. Without
|
|
# this call a frozen app that ever starts one forks a second copy of the whole UI
|
|
# instead, which looks like the app launching itself over and over.
|
|
multiprocessing.freeze_support()
|
|
|
|
from meshterm.cli import main
|
|
|
|
sys.exit(main())
|