Skip to content

Only include files in src+tests in hatch build targets#2

Merged
jfrederi-akamai merged 3 commits into
linode:mainfrom
jfrederi-akamai:fix/hatch-build-targets
Jun 12, 2026
Merged

Only include files in src+tests in hatch build targets#2
jfrederi-akamai merged 3 commits into
linode:mainfrom
jfrederi-akamai:fix/hatch-build-targets

Conversation

@jfrederi-akamai

Copy link
Copy Markdown
Contributor

I was having some trouble running uv build locally, and it turns out that the hatchling build backend includes every non-git-ignored file in an sdist. An emacs lock file broke the build for me, but this notably also includes any virtualenvs that may be in the repo root, which isn't quite what we want.

I was having some trouble running `uv build` locally, and it turns out
that the hatchling build backend includes every non-git-ignored file
in an sdist. An emacs lock file broke the build for me, but this
notably also includes any virtualenvs that may be in the repo root,
which isn't quite what we want.
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
David spotted that it's only for sdists that hatchling bundles the
entire project root into by default. We don't need to mess with the
defaults for wheels, so let's not.
We also want the docs in our sdists, and there are a couple other
files in the root that we needed to both run tests correctly and build
the docs.
@jfrederi-akamai jfrederi-akamai merged commit 96d03b0 into linode:main Jun 12, 2026
9 checks passed
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