Exclude web/.gitkeep from PyPI wheel distribution#36
Conversation
- Add `only-include` configuration to wheel build targeting Python files and type stubs - Prevent `.gitkeep` placeholder from being included in wheel via `packages` directive - Maintain `.gitkeep` in repository through `force-include` for web directory structure - Bump version to 1.3.3 - Update CHANGELOG with fix details PyPI rejected previous wheel due to duplicate `.gitkeep` file. The `only-include` directive now explicitly specifies which files to package, preventing unintended inclusion of placeholder files while preserving the web directory structure through force-include.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| "SVG2DrawIOLib/**/*.py", | ||
| "SVG2DrawIOLib/**/*.typed", | ||
| "SVG2DrawIOLib/py.typed", | ||
| ] |
There was a problem hiding this comment.
only-include does not support glob patterns
High Severity
The only-include directive in hatchling only accepts explicit paths to directories or files — it does not support glob patterns. The entries SVG2DrawIOLib/**/*.py and SVG2DrawIOLib/**/*.typed use glob syntax (**/*), which only-include will not resolve. This likely causes the wheel to contain no Python source files at all (only the force-include web directory), producing a completely broken package. The include option supports globs, but only-include does not.
| "SVG2DrawIOLib/**/*.py", | ||
| "SVG2DrawIOLib/**/*.typed", | ||
| "SVG2DrawIOLib/py.typed", | ||
| ] |
There was a problem hiding this comment.
only-include paths missing required src/ prefix
High Severity
The only-include paths reference SVG2DrawIOLib/... but the actual source files live at src/SVG2DrawIOLib/... relative to the project root. Because only-include takes precedence over packages, the path-collapsing behavior of packages = ["src/SVG2DrawIOLib"] is lost. Even if the glob pattern issue were fixed, these paths would still not resolve to any files on disk since the src/ prefix is missing.


only-includeconfiguration to wheel build targeting Python files and type stubs.gitkeepplaceholder from being included in wheel viapackagesdirective.gitkeepin repository throughforce-includefor web directory structure.gitkeepfile. Theonly-includedirective now explicitly specifies which files to package, preventing unintended inclusion of placeholder files while preserving the web directory structure through force-include.Note
Low Risk
Packaging-config-only change plus version/changelog bump; low risk outside of potentially affecting which files land in the published wheel.
Overview
Fixes PyPI wheel build rejection by tightening hatchling wheel contents to
only-includePython sources/type stubs, preventing theweb/.gitkeepplaceholder from being pulled in via thepackagesdirective while still bundlingweb/viaforce-include.Bumps the package version to
1.3.3and documents the packaging fix inCHANGELOG.md.Written by Cursor Bugbot for commit f24678d. This will update automatically on new commits. Configure here.