serhii.net

In the middle of the desert you can say anything you want

27 Feb 2025

Python dynamic versioning with uv and hatch

[project] 
dynamic = ["version"] 

[tool.hatch.version] 
path = "..."

Path is a python file w/ version info. If using src layout, src has to be included in the path.j

For uv, this works. Described for example here: Versioning Python Projects with Hatch (I like __init__.py though, not about as that guide does)

uv-dynamic-versioning · PyPI exists but I don’t really see why.

Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus