From 55cf06d30c32abb1197ccdaa9c6e28b6ff65947b Mon Sep 17 00:00:00 2001 From: Jonathan Frederickson Date: Thu, 11 Jun 2026 09:04:31 -0700 Subject: [PATCH 1/3] Only include files in src+tests in hatch build targets 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. --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index ba1e55b..73bc8c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,6 +101,12 @@ typing = [ [tool.hatch.version] source = "vcs" +[tool.hatch.build.targets.sdist] +only-include = [ "src", "tests" ] + +[tool.hatch.build.targets.wheel] +packages = [ "src/certwrangler", "tests" ] + [tool.ruff] src = [ "src" ] fix = true From 3f1c29bd97cdd245eaf6be359cf869c6e8627c5d Mon Sep 17 00:00:00 2001 From: Jonathan Frederickson Date: Fri, 12 Jun 2026 11:32:28 -0700 Subject: [PATCH 2/3] Remove tweaked wheel build targets 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. --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 73bc8c1..e7aab4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,9 +104,6 @@ source = "vcs" [tool.hatch.build.targets.sdist] only-include = [ "src", "tests" ] -[tool.hatch.build.targets.wheel] -packages = [ "src/certwrangler", "tests" ] - [tool.ruff] src = [ "src" ] fix = true From 5ff5732e2504a9c34a6851a1d70216b623f3f4ca Mon Sep 17 00:00:00 2001 From: Jonathan Frederickson Date: Fri, 12 Jun 2026 11:50:59 -0700 Subject: [PATCH 3/3] Make sdist includes more explicit and expand them a bit 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. --- pyproject.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e7aab4e..0b71656 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,7 +102,14 @@ typing = [ source = "vcs" [tool.hatch.build.targets.sdist] -only-include = [ "src", "tests" ] +include = [ + "/docs", + "/src", + "/tests", + ".pre-commit-config.yaml", + "certwrangler.example.yaml", + "uv.lock", +] [tool.ruff] src = [ "src" ]