versiontools supports a form of version control system integration. This code is only triggered for development versions of your project (indicated by setting releaselevel to dev")
In development mode the generated version string will include the revision number or the abbreviated hash of the current commit. This makes it nice for ongoing releases on pypi as after each commit your source tarballs will be different.
The following version control systems are supported out of the box. To use them you need to have the corresponding libraries installed. Check the links below for details.
Using bazaar appends the branch revision to the version string. See versiontools.bzr_support
VCS integration is not hard-coded into versiontools. Instead any package that uses setuptools and provides an entry point versiontools.vcs_integration can add support for integration with additional version control systems.
To make versiontools aware of additional plug-ins they need to be registered in the entry points database. To do that make sure your package uses setuptools and put the following snippet into your setup.py:
setup( name="foo", description="The imaginary foo version control system", entry_points=""" [versiontools.vcs_integration] foo=foo.versiontools_plugin:FooIntegration """ )
This will make versiontools look for the foo system by importing foo.versiontools_plugin and extracting the FooIntegration class. Remember that your foo package needs to be installed for this system to work.