From 58ea9d8f7b2ca0f13f08c46fd7242b855ce0a9ba Mon Sep 17 00:00:00 2001 From: Daniel Sanz <13658011+sdn4z@users.noreply.github.com> Date: Tue, 19 Aug 2025 09:35:11 +0200 Subject: [PATCH] fix: dynamic versioning --- pyproject.toml | 20 ++++++++++++++++++-- uv.lock | 1 - 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ef21a0fd..58da8481 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,9 +21,25 @@ dependencies = [ "tomli<3.0.0,>=2.2.1; python_version < \"3.13\"", ] name = "twyn" -version = "2.9.0" -description = "" +description = "Security tool against dependency typosquatting attacks" readme = "README.md" +dynamic = ["version"] + +[tool.hatch.version] +path = "VERSION" +pattern = "v(?P[^\\s]+)" + +[tool.hatch.build.targets.wheel] +packages = ["src/twyn"] + +[tool.hatch.build.targets.sdist] +include = [ + "/src", + "/README.md", + "/LICENSE", + "/VERSION", + "/pyproject.toml", +] [project.scripts] twyn = "twyn.cli:entry_point" diff --git a/uv.lock b/uv.lock index eeece6a8..ef0e0e23 100644 --- a/uv.lock +++ b/uv.lock @@ -1149,7 +1149,6 @@ wheels = [ [[package]] name = "twyn" -version = "2.8.28" source = { editable = "." } dependencies = [ { name = "click", version = "8.1.8", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" },