Skip to content

Code version source


Updates

Setting the version is not supported.

Configuration

The version source plugin name is code.

[tool.hatch.version]
source = "code"
[version]
source = "code"

Options

Option Description
path (required) A relative path to a Python file that will be loaded
expression A Python expression that when evaluated in the context of the loaded file returns the version. The default expression is simply __version__.

Last update: July 2, 2022