1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-vcversioner
6 VARIANTS= py27 py38 py37
7 SDESC[py37]= Extract version from version control tag (PY 37)
8 SDESC[py38]= Extract version from version control tag (PY 38)
9 SDESC[py27]= Extract version from version control tag (PY 27)
10 HOMEPAGE= https://github.com/habnabit/vcversioner
11 CONTACT= Python_Automaton[python@ironwolf.systems]
14 SITES[main]= PYPI/v/vcversioner
15 DISTFILE[1]= vcversioner-2.16.0.0.tar.gz:main
21 OPTIONS_AVAILABLE= PY27 PY38 PY37
22 OPTIONS_STANDARD= none
23 VOPTS[py37]= PY27=OFF PY38=OFF PY37=ON
24 VOPTS[py38]= PY27=OFF PY38=ON PY37=OFF
25 VOPTS[py27]= PY27=ON PY38=OFF PY37=OFF
27 DISTNAME= vcversioner-2.16.0.0
31 [PY37].USES_ON= python:py37
33 [PY38].USES_ON= python:py38
35 [PY27].USES_ON= python:py27
37 [FILE:3360:descriptions/desc.single]
38 .. image:: https://travis-ci.org/habnabit/vcversioner.png
44 `Elevator pitch`_: you can write a ``setup.py`` with no version information
45 specified, and vcversioner will find a recent, properly-formatted VCS tag
47 extract a version from it.
49 It's much more convenient to be able to use your version control system's
50 tagging mechanism to derive a version number than to have to duplicate that
51 information all over the place. I eventually ended up copy-pasting the same
52 code into a couple different ``setup.py`` files just to avoid duplicating
53 version information. But, copy-pasting is dumb and unit testing
55 files is hard. This code got factored out into vcversioner.
61 vcversioner installs itself as a setuptools hook, which makes its use
64 from setuptools import setup
68 setup_requires=['vcversioner'],
72 The presence of a ``vcversioner`` argument automagically activates
74 and updates the project's version. The parameter to the ``vcversioner``
75 argument can also be a dict of keyword arguments which |find_version|
78 To allow tarballs to be distributed without requiring a ``.git`` (or
80 etc.) directory, vcversioner will also write out a file named (by default)
81 ``version.txt``. Then, if there is no VCS program or the program is unable
83 find any version information, vcversioner will read version information
85 the ``version.txt`` file. However, this file needs to be included in a
86 distributed tarball, so the following line should be added to
91 This isn't necessary if ``setup.py`` will always be run from a checkout,
93 otherwise is essential for vcversioner to know what version to use.
95 The name ``version.txt`` also can be changed by specifying the
97 parameter. For example::
99 from setuptools import setup
103 setup_requires=['vcversioner'],
105 'version_file': 'custom_version.txt',
109 For compatibility with `semantic versioning`_, ``vcversioner`` will strip
110 leading ``'v'``\ s from version tags. That is, the tag ``v1.0`` will be
111 treated as if it was ``1.0``.
113 Other prefixes can be specified to be stripped by using the
115 argument to vcversioner. For compatibility with ``git-dch``, one could
117 the ``strip_prefix`` as ``'debian/'``.
123 It's not necessary to depend on vcversioner; while `pip`_ will take care of
124 dependencies automatically, sometimes having a self-contained project is
125 simpler. vcversioner is a single file which is easy to add to a project.
127 copy the entire ``vcversioner.py`` file adjacent to the existing
129 file and update the usage slightly::
131 from setuptools import setup
136 version=vcversioner.find_version().version,
139 This is necessary because the ``vcversioner`` distutils hook won't be
146 ``setup.py`` isn't the only place that version information gets
148 generating a version module, the ``__init__.py`` file of a package can
150 version information. For example, with a package named ``spam``::
152 from setuptools import setup
156 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b 9024 vcversioner-2.16.0.0.tar.gz