Dynamic Fashion

Dynamic Fashion. Setting the project verion dynamically can be done by changing up the following to your pyproject.toml. Then use importlib.metadata.version to get the version number.

Dynamic Fashion

For setuptools, there is an easier way to get. Judging by [tool.setuptools.dynamic], you're using setuptools. Currently the following fields can be listed as dynamic:

When These Fields Are Expected To Be Provided By.


Then use importlib.metadata.version to get the version number. 3 dynamic versioning works differently on different build backends. Setting the project verion dynamically can be done by changing up the following to your pyproject.toml.

For Setuptools, There Is An Easier Way To Get.


I've read through the dynamic metadata section of the docs. The name of the project. If you need to reference it.

See The Dedicated Versioning Section.


Currently the following fields can be listed as dynamic:

Images References :

I've Read Through The Dynamic Metadata Section Of The Docs.


The name of the project. For setuptools, there is an easier way to get. Setting the project verion dynamically can be done by changing up the following to your pyproject.toml.

Hatch Only Accepts A Path To Store Your Version.


If you need to reference it. In such cases, you should mark the field as. Project metadata is stored in a pyproject.toml file located at the root of a project's tree and is based entirely on the standard.

Judging By [Tool.setuptools.dynamic], You're Using Setuptools.


However, if you want the version to be available in the variable __version__ in the __init__.py file of your module, you need to dynamically update the value of this variable when. Then use importlib.metadata.version to get the version number. Many build backends can read the version from a __version__ attribute in your code, a git tag, or similar.

See The Dedicated Versioning Section.


To do this, you need to leave the version field out from your pyproject.toml and add version to the list of project.dynamic: When these fields are expected to be provided by. 3 dynamic versioning works differently on different build backends.

Currently The Following Fields Can Be Listed As Dynamic: