fix: remove duplicate force-include causing PyPI wheel rejection#37
Merged
Conversation
The force-include directives for proto/gen files are redundant since the packages directive already includes everything under capiscio_mcp/. The duplicate entries in the wheel ZIP caused PyPI to reject the upload with 'Duplicate filename in local headers'.
There was a problem hiding this comment.
Pull request overview
This PR fixes PyPI wheel rejections caused by duplicate ZIP entries by removing redundant Hatch force-include directives that were re-including files already covered by the wheel packages = ["capiscio_mcp"] setting.
Changes:
- Removed
[tool.hatch.build.targets.wheel.force-include]for generated proto modules to avoid duplicate wheel entries. - Removed
[tool.hatch.build.targets.sdist.force-include]for the same generated proto path, relying on default sdist behavior + tracked files.
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.
Problem
The
force-includedirectives inpyproject.tomlduplicate files already included via thepackagesdirective. PyPI now rejects wheels with duplicate filename entries in ZIP local headers.Fix
Remove the redundant
[tool.hatch.build.targets.wheel.force-include]and[tool.hatch.build.targets.sdist.force-include]sections. The proto/gen files are tracked in git and already included viapackages = ["capiscio_mcp"].Verification
uv build --wheel— no duplicate entriesunzip -loutput — all proto files present exactly once