Consider using setuptools-scm and setting dynamic = ["version"], something along the lines of:
[project]
dynamic = ["version"] # Let the build backend determine the version
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"
Consider using setuptools-scm and setting
dynamic = ["version"], something along the lines of: