From b055203dc44c3face70ae5f8badd632b6418587a Mon Sep 17 00:00:00 2001 From: Antonio Paolillo Date: Thu, 5 Feb 2026 10:54:36 +0100 Subject: [PATCH] releasing: Exclude venvs from hatchling builds Document SSH-based clone in the release procedure and explicitly exclude local virtual environments from Hatchling sdist and wheel builds. This prevents accidental leakage of `.venv*` directories into release artifacts. Signed-off-by: Antonio Paolillo --- RELEASING.md | 2 +- pyproject.toml | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/RELEASING.md b/RELEASING.md index 8f1357f..8fa3de4 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -67,7 +67,7 @@ git push origin v0.X.Y Use a fresh clone and venv to avoid leaking deps: ```bash -git clone https://github.com/apaolillo/pythainer.git +git clone git@github.com:apaolillo/pythainer.git cd pythainer/ python3 -m venv .venv-release . .venv-release/bin/activate diff --git a/pyproject.toml b/pyproject.toml index ea480cb..295c107 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,31 @@ dev = [ requires = ["hatchling"] build-backend = "hatchling.build" +[tool.hatch.build] +exclude = [ + "/.venv*", + "/venv*", + "/env*", + "/__pycache__", + "*.pyc", + "/.git", + "/.github", +] + +[tool.hatch.build.targets.sdist] +exclude = [ + "/.venv*", + "/venv*", + "/env*", +] + +[tool.hatch.build.targets.wheel] +exclude = [ + "/.venv*", + "/venv*", + "/env*", +] + [tool.black] line-length = 100 target-version = ['py310']