Skip to main content

Simple Git version plugin for setuptools

Project description

Simple Git version plugin for setuptools.


Add setuptools-gitver to setup_requires in the of your project. Then, after each release, add .post+gitver suffix to the version string.

For example, in

import setuptools

if __name__ == '__main__':

This will then generate version numbers like 1.2.3.post0.dev7+ga1b2c3d where 7 is the number of commits since the v1.2.3 tag and a1b2c3d is commit id of the HEAD.

When creating a release, update the version and remove the post+gitver suffix. When there is no +gitver suffix, the version won’t be touched by Setuptools Gitver. Also remember to tag the release in Git with git tag -a v1.2.3.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

setuptools-gitver-0.1.1.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

setuptools_gitver-0.1.1-py2.py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page