From dd75d5939fbbf6a64cef93fcdeddf64eb488946d Mon Sep 17 00:00:00 2001 From: Joseph Magly <1159087+jmagly@users.noreply.github.com> Date: Fri, 14 Aug 2026 10:00:54 -0400 Subject: [PATCH] test: verify wheel distribution contents (#57) --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5078ee..3bec41c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,39 @@ jobs: - name: Build source and wheel distributions run: python -m build --sdist --wheel + - name: Verify wheel contents and entry point + run: | + python - <<'PY' + from pathlib import Path + from zipfile import ZipFile + + wheels = list(Path("dist").glob("*.whl")) + if len(wheels) != 1: + raise SystemExit(f"expected one wheel, found: {wheels}") + + with ZipFile(wheels[0]) as archive: + names = set(archive.namelist()) + required = { + "app.py", + "obliteratus/__init__.py", + "obliteratus/local_ui.py", + } + missing = sorted(required - names) + if missing: + raise SystemExit(f"wheel is missing required modules: {missing}") + + entry_points = [ + name for name in names if name.endswith(".dist-info/entry_points.txt") + ] + if len(entry_points) != 1: + raise SystemExit(f"expected one entry_points.txt, found: {entry_points}") + contents = archive.read(entry_points[0]).decode("utf-8") + if "obliteratus = obliteratus.cli:main" not in contents: + raise SystemExit("wheel is missing the obliteratus console entry point") + + print(f"verified wheel contents: {wheels[0]}") + PY + lint: name: Ruff runs-on: ubuntu-latest