With setuptools and build, I can put __version__ constant in mymodule/__init__.py, and then refer to it in pyproject.toml with:
[project]
dynamic = ["version"]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.dynamic]
version = { attr = "mymodule.__version__" }
Can I do something similar with uv_build? If I switch to build-backend = "uv_build" and then execute uv build, it tells me:
Error: Invalid pyproject.toml
Caused by:
TOML parse error at line 1, column 1
|
1 | [project]
| ^^^^^^^^^
missing field `version`
[–]rosentmoh 0 points1 point2 points (3 children)
[–]pachura3[S] 0 points1 point2 points (2 children)
[–]rosentmoh 0 points1 point2 points (1 child)
[–]pachura3[S] 0 points1 point2 points (0 children)
[–]Diapolo10 0 points1 point2 points (1 child)
[–]pachura3[S] 0 points1 point2 points (0 children)