8000 fix(packaging): keep the web UI in the sdist, so the wheel keeps it too by dmux · Pull Request #5 · dmux/minilake · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,23 @@ jobs:
- name: Check package metadata
run: uvx twine check dist/*

# A wheel with no web UI installs and runs fine — it just silently has no /ui,
# and a PyPI upload cannot be replaced. The failure is easy to reintroduce:
# `uv build` goes through the sdist, so the export has to survive *both* build
# targets, not just the wheel.
- name: Verify the wheel carries the web UI
run: |
count=$(python -c "
import glob, zipfile
names = zipfile.ZipFile(sorted(glob.glob('dist/*.whl'))[-1]).namelist()
print(sum(1 for n in names if 'minilake/ui_static/' in n))
")
if [ "$count" -lt 10 ]; then
echo "::error::The wheel contains $count ui_static files. The web UI was dropped during packaging."
exit 1
fi
echo "Web UI present: $count files."

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ packages = ["src/minilake"]
artifacts = ["src/minilake/ui_static/**"]

[tool.hatch.build.targets.sdist]
# Same override as the wheel, and for a sharper reason: `uv build` (what the release
# workflow runs) builds the sdist first and then builds the wheel *from that sdist*.
# Without this the export is dropped at the sdist step and the published wheel has no
# web UI at all — silently, since nothing fails. `uv build --wheel` hides the bug by
# going straight from the source tree.
artifacts = ["src/minilake/ui_static/**"]
# The sdist is what someone builds from, so it carries the source, the docs and the
# compose files. Agent config and local tooling are not part of that.
exclude = [
Expand Down
Loading
0