Skip to main content

Use version control tags to discover version numbers

Project description


In-depth documentation:

Elevator pitch: you can write a with no version number specified, and vcversioner will find a recent properly-formatted git tag and extract the version number from it.

To quote myself:

It’s much more convenient to be able to use your version control system’s tagging mechanism to derive a version number than to have to duplicate that information all over the place.

I ended up copy-pasting the same code into a couple different files just to avoid duplicating version information. But, copy-pasting is dumb and unit testing files is hard. Thus: vcversioner.

Basic use

vcversioner installs itself as a distutils hook, which makes its use exceedingly simple:

from setuptools import setup

    # [...]

The presence of a vcversioner argument automagically activates vcversioner and updates the project’s version. In most cases, the following line should also be added to

include version.txt

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

vcversioner- (4.3 kB view hashes)

Uploaded Source

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