Repository navigation
Build standalone Windows exe in CI - #2
Open
LeeHudsonDLS wants to merge 2 commits into
Open
LeeHudsonDLS wants to merge 2 commits into
LeeHudsonDLS wants to merge 2 commits into
Conversation
Freeze dls-plc-tools into a single Windows .exe with PyInstaller on a windows-latest runner, so IT-locked DLS workstations without uv/pip can run the tool by downloading one file. Because _release.yml attaches every run artifact, the exe lands on the GitHub release on tags; the windows-exe job also runs on push/PR to catch freeze breakage early, and release now needs it. The spec force-collects aphyt/openpyxl submodules (the CLI/GUI lazy-import aphyt and it loads CIP classes dynamically, so the static graph misses them); console=True keeps the read CLI's stdout working. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1NtKmMT92DTBWro4vVEL5
Freezing dls_plc_tools/__main__.py directly made it the top-level script with no parent package, so its `from . import ...` relative imports raised "ImportError: attempted relative import with no known parent package" at startup (the CI smoke test caught it). Freeze packaging/entrypoint.py instead, which imports the package absolutely so those imports resolve. Verified locally by freezing on Linux and running --version / --help / read --help. Also harden the workflow: build with `uv run --with pyinstaller` (a plain `uv run pyinstaller` re-syncs to the lockfile and uninstalls pyinstaller first), and upload the exe with `if: always()` so a failed smoke test still leaves an artifact to inspect while still failing the job. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1NtKmMT92DTBWro4vVEL5
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Freeze dls-plc-tools into a single Windows .exe with PyInstaller on a windows-latest runner, so IT-locked DLS workstations without uv/pip can run the tool by downloading one file. Because _release.yml attaches every run artifact, the exe lands on the GitHub release on tags; the windows-exe job also runs on push/PR to catch freeze breakage early, and release now needs it.
The spec force-collects aphyt/openpyxl submodules (the CLI/GUI lazy-import aphyt and it loads CIP classes dynamically, so the static graph misses them); console=True keeps the read CLI's stdout working.
Claude-Session: https://claude.ai/code/session_01A1NtKmMT92DTBWro4vVEL5