fix(hosting): drop redundant templates force-include causing wheel ZIP dupes - #54
Merged
Merged
Conversation
The workflow-level permissions block only listed contents/id-token, which implicitly set actions to none. gh run list then returned nothing, the 2>/dev/null swallowed the error, and preflight spun out its 5-minute timeout even though pr.yml had already finished green. - add actions: read to the permissions block - drop 2>/dev/null so future gh failures are visible in the log
…P dupes packages = ["simple_module_hosting"] already includes the templates/ subdirectory and all its files (hatchling recurses into packaged dirs and picks up non-.py files too). The force-include entry re-added every file, producing 34 duplicate ZIP local headers. PyPI's upload validator rejects such archives with a 400. Other modules' force-include blocks stay — they ship package.json from the module root into the inner package dir, which hatchling wouldn't pick up from packages = ["<name>"] alone. Verified: wheel goes from 99 entries (34 dupes) to 65 entries (0 dupes), all 34 template files still shipped, twine check passes on all 14.
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.
Summary
simple_module_hosting-0.0.1-py3-none-any.whlto PyPI and hit400 Bad Request — Duplicate filename in local headers.framework/hosting/pyproject.tomldeclared bothpackages = [\"simple_module_hosting\"]and[tool.hatch.build.targets.wheel.force-include] \"simple_module_hosting/templates\" = \"simple_module_hosting/templates\". Hatchling already ships every file under a packaged directory (including non-.pytemplate assets), so the force-include added each one a second time — 34 duplicate ZIP entries that PyPI's archive validator rejects.package.jsonfrom the module root into the inner package dir, whichpackages = [\"<name>\"]wouldn't pick up.Verification (local)
uv build --all-packages→ 14 wheels, 14 sdists.python -cZIP scan across all 14 wheels: 0 duplicate entries.twine checkon all 28 artifacts: PASSED.simple_module_hostingwheel: 99 → 65 entries, all 34 template files still present (e.g.templates/host/Makefile,templates/module/__PACKAGE__/endpoints/api.py.tpl).Test plan
releasewithversion=0.0.1 target=pypiand confirm all 14publish-pypijobs reach upload successfully.