Commit 06e7feb
chore(packaging): whitelist sdist contents to block local-publish leaks
Hatchling's default sdist behavior packs everything in the project root,
which is fine in CI (clean checkout) but ships per-developer state from
a laptop: .mg-tools/, .claude/, .claude.bak.*/, CLAUDE.md, ROADMAP.md,
work diaries, scratch reports, .coverage, etc. None of those have ever
been on PyPI because every release has shipped via the publish.yml
workflow's clean GitHub Actions checkout — but a single accidental
`uv publish` from a dev machine would have leaked all of them.
This adds an explicit `[tool.hatch.build.targets.sdist]` include list
plus a small exclude list for the internal docs that live inside
included dirs (docs/DEVELOPERS.md, docs/quick_start.ipynb). Even from a
developer's laptop, only the listed paths can now end up on PyPI.
Verified locally: `uv build` produces a sdist whose top-level entries
are .github, .gitignore, CHANGELOG.md, docs, LICENSE, PKG-INFO,
pyproject.toml, README.md, scripts, tango, tests. No more .mg-tools,
.claude, CLAUDE.md, .coverage, DEVELOPERS.md, or quick_start.ipynb.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c21637b commit 06e7feb
1 file changed
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
125 | 153 | | |
126 | 154 | | |
127 | 155 | | |
| |||
0 commit comments