8000 Fix cross-platform Python packaging and CLI entry points by Napreth · Pull Request #831 · bkerler/edl · GitHub
[go: up one dir, main page]

Skip to content

Fix cross-platform Python packaging and CLI entry points - #831

Open
Napreth wants to merge 2 commits into
bkerler:masterfrom
Napreth:fix/python-packaging
Open

Napreth wants to merge 2 commits into
bkerler:masterfrom
Napreth:fix/python-packaging

Conversation

@Napreth
@Napreth Napreth commented Oct 21, 2026
Copy link
Copy Markdown

Summary

Fix Python package installation on Windows, where edlclient/edl.py can be installed as a regular file containing ../edl.py instead of a valid Python module.

This causes the edl console entry point to fail with a SyntaxError after an otherwise successful pipx installation.

The changes also fix several CLI entry-point issues and preserve direct execution from a source checkout.

Changes

  • Move the EDL implementation into edlclient/edl.py as a regular Python file, keeping the root edl.py as a compatibility launcher.
  • Remove the Tools/Library and Tools/Config symlinks and update the affected imports.
  • Move argument parsing into run() to avoid executing it during module imports.
  • Fix CLI entry points that were incompatible with the declared console_scripts, including sierrakeygen and fhloaderparse.
  • Restrict setuptools package discovery to edlclient and its subpackages.
  • Add packaging regression tests for wheel and sdist builds, installed CLI entry points, and direct source execution.
  • Add a Windows/Linux CI matrix covering Python 3.10 and 3.14.

Testing

All four platform/Python combinations passed locally:

Environment Python Result
Linux (act) 3.10.22 Passed
Linux (act) 3.14.8 Passed
Windows (native) 3.10.21 Passed
Windows (native) 3.14.5 Passed

Each combination passed all three packaging tests, covering:

  • Direct wheel builds and sdist-to-wheel builds.
  • All seven installed CLI entry points.
  • Direct source launchers in a separate environment without an installed edlclient package.

No physical device operations were tested.

Related to #830. This PR addresses the Python packaging part; dependency declarations and installation scripts are handled separately.

Move the EDL implementation into the package, retain the source launcher, and remove tool import symlinks. Make CLI entry points safe to import and callable without arguments. Restrict package discovery and add wheel/sdist installation checks for Windows and Unix.

Refs: bkerler#830 (Python packaging stage)
Run source launchers in a dependency-only virtual environment and assert edlclient is not importable before execution. Keep wheel installation checks in a separate environment, and add the source root for qc_diag only during direct script execution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0