Simple Git version plugin for setuptools
Project description
Simple Git version plugin for setuptools.
Usage
Add setuptools-gitver to setup_requires in the setup.py of your project. Then, after each release, add .post+gitver suffix to the version string.
For example, in setup.py:
import setuptools if __name__ == '__main__': setuptools.setup( setup_requires=['setuptools-gitver'], name='example-package', version='1.2.3.post+gitver', )
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
Built Distribution
Hashes for setuptools_gitver-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00cbb26940067adabebd479ae32e185f0c5ffaffd7bd24f272ee987f9ccfe44e |
|
MD5 | 110d4b7d4f907ecf4270b43c99ac3f08 |
|
BLAKE2b-256 | 88e0432c91dae8785a5fb819fd015a814a8faa38c1aa1bdb24f26dfc3c89392a |