setuptools-git-versioning#

Project Status: Active – The project has reached a stable, usable state and is being actively developed. PyPI PyPI License PyPI Python Version ReadTheDocs Build Coverage pre-commit.ci

Use git repo data (latest tag, current commit hash, etc) for building a version number according PEP 440.

Features:

  • Can be installed & configured through both setup.py and PEP 518’s pyproject.toml

  • Does not require to change source code of the project

  • Tag-, file-, and callback-based versioning schemas are supported

  • Templates for tag, dev and dirty versions are separated

  • Templates support a lot of substitutions including git and environment information

  • Well-documented

See difference between setuptools-git-versioning and other tools.

Limitations:

  • Currently the only supported VCS is Git

  • Only git v2 is supported

  • Currently does not support exporting version to file for runtime use