Skip to main content

generate a version number from darcs history

Project description

I need a new maintainer!

Darcsver needs a new maintainer. The original author, Zooko Wilcox-O’Hearn, is not planning to make further changes to it unless there is some unexpected need to do so.

What Does It Do

Create files containing version numbers, based upon the latest darcs release tag.

If your source tree is coming from darcs (i.e. it is in a darcs repository), this tool will determine the most recent release tag, count the patches that have been applied since then, and compute a version number to be written into (and optionally other version files). This version number will be available by doing:

from your_package_name import __version__

Source trees that do not come from darcs (e.g. release tarballs, nightly tarballs) and are not within a darcs repository should instead, come with a that was generated before the tarball was produced. In this case, this tool will quietly exit without modifying the existing .

‘release tags’ are tags in the source repository that match the following regexp:



With easy_install:

easy_install darcsver

Alternative manual installation:

tar -zxvf darcsver-X.Y.Z.tar.gz cd darcsver-X.Y.Z python install

Where X.Y.Z is a version number.

Alternative to make a specific package use darcsver without installing darcsver into the system:

Put “setup_requires=[‘darcsver’]” in the call to setup() in the package’s file.


There are two ways to use this: the command-line tool and the setuptools plugin.

To use the command-line tool, execute it as:


To use the setuptools plugin (which enables you to write “./ darcsver” and which cleverly figures out where the file ought to go), you must first package your python module with and use setuptools.

The former is well documented in the distutils manual:

To use setuptools instead of distutils, just edit and change

from distutils.core import setup


from setuptools import setup


How to distribute Python modules with Distutils:

Setuptools complete manual:

Thanks to Yannick Gingras for providing the prototype for this README.rst.

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

darcsver-1.7.4.tar.gz (8.9 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