Skip to content

fix(build): scope root file inclusion to sdist target only - #231

Merged
stanislaw merged 1 commit into
mainfrom
stanislav/package_bug
Aug 11, 2026
Merged

stanislaw merged 1 commit into
mainfrom
stanislav/package_bug

Conversation

@stanislaw

Copy link
Copy Markdown
Contributor

hatchling settings under the top-level [tool.hatch.build] table apply to both the sdist and wheel build targets unless overridden per target. Our include list (LICENSE, README.md, pyproject.toml, reqif/) lived at that shared level, so those three loose files were also being bundled into the wheel.

Since a wheel is installed by unzipping its contents directly into site-packages, this meant pip install reqif dropped site-packages/LICENSE, site-packages/README.md, and site-packages/pyproject.toml at the top of site-packages, outside of the reqif/ package.

Move the include list into [tool.hatch.build.targets.sdist] so it only affects the sdist. The wheel target now falls back to hatchling's default behavior of packaging just the reqif/ package, with license/readme metadata carried in the wheel's .dist-info instead.

hatchling settings under the top-level [tool.hatch.build] table apply
to both the sdist and wheel build targets unless overridden per
target. Our `include` list (LICENSE, README.md, pyproject.toml,
reqif/) lived at that shared level, so those three loose files were
also being bundled into the wheel.

Since a wheel is installed by unzipping its contents directly into
site-packages, this meant `pip install reqif` dropped
site-packages/LICENSE, site-packages/README.md, and
site-packages/pyproject.toml at the top of site-packages, outside of
the reqif/ package.

Move the include list into [tool.hatch.build.targets.sdist] so it
only affects the sdist. The wheel target now falls back to
hatchling's default behavior of packaging just the reqif/ package,
with license/readme metadata carried in the wheel's .dist-info
instead.
@stanislaw
stanislaw merged commit 95acc75 into main Aug 11, 2026
9 checks passed
@stanislaw
stanislaw deleted the stanislav/package_bug branch August 11, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants