Repository navigation
fix(packaging): keep results/ and data/ out of the sdist - #114
Conversation
The sdist had no include list, so `uv build` bundled results/ and data/ (33 MB). It now holds the tool's source, the tests, the readme and the licence files, about 160 KB, and a test builds it and checks its files and size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ReviewVerdict: Correct. No P0–P2 defects, one P3 spec note, one P3 defect and one refinement. Checked
Spec
Defects[P3] The test builds with the locked hatchling, but RefinementsThe comment and the include list disagree about NOTICE ( Not reviewed: how this combines with #112's real |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-upFixed
Declined
|
Closes #113
Summary
The hatchling sdist had no include list, so
uv buildbundledresults/anddata/and came out at 33 MB. It now holds only the tool's source (src/backread), the tests, and the files a source build needs:pyproject.toml,README.md,LICENSE, plusNOTICEandLICENSES/once #112 adds them. It's about 160 KB.Changes
only-includefor the sdist target, so nothing new at the repo root leaks in by default. Hatchling still addspyproject.toml, the readme, the licence files and.gitignoreitself.src/backread_expstays out, like it does from the wheel: the experiment runs from a checkout. That means most of the bundled tests import modules the sdist doesn't ship, so they only run from a checkout too.tests/test_packaging.pybuilds the sdist in-process with hatchling'sSdistBuilder(now a dev dependency, so the test runs offline), then checks it's under 1 MB, holds nothing outside the allowed files and directories, and includes every.pyfile insrc/backread.Verification
make readypasses (680 tests).only-includeremoved, the new test fails:assert 33060442 < 1000000.uv buildbuilds the sdist and then a wheel from it. With a stand-inNOTICEandLICENSES/Apache-2.0.txt, both end up in the sdist, andNOTICEends up in the wheel'slicenses/.Observations
LICENSEandNOTICEthrough hatchling's default licence-file patterns, but notLICENSES/Apache-2.0.txt. If chore: pre-publication check #112 wants that file in the wheel,[project] license-filesneeds to list it.