1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-vcversioner
7 SDESC[py310]= Extract version from version control tag (3.10)
8 SDESC[v11]= Extract version from version control tag (3.11)
9 HOMEPAGE= https://github.com/habnabit/vcversioner
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPI/v/vcversioner
14 DISTFILE[1]= vcversioner-2.16.0.0.tar.gz:main
19 OPTIONS_AVAILABLE= PY310 PY311
20 OPTIONS_STANDARD= none
21 VOPTS[py310]= PY310=ON PY311=OFF
22 VOPTS[v11]= PY310=OFF PY311=ON
24 DISTNAME= vcversioner-2.16.0.0
28 [PY310].USES_ON= python:py310,sutools
30 [PY311].USES_ON= python:v11,sutools
32 [FILE:3061:descriptions/desc.single]
33 .. image:: https://travis-ci.org/habnabit/vcversioner.png
39 `Elevator pitch`_: you can write a ``setup.py`` with no version information
40 specified, and vcversioner will find a recent, properly-formatted VCS tag
42 extract a version from it.
44 It's much more convenient to be able to use your version control system's
45 tagging mechanism to derive a version number than to have to duplicate that
46 information all over the place. I eventually ended up copy-pasting the same
47 code into a couple different ``setup.py`` files just to avoid duplicating
48 version information. But, copy-pasting is dumb and unit testing
50 files is hard. This code got factored out into vcversioner.
55 vcversioner installs itself as a setuptools hook, which makes its use
58 from setuptools import setup
62 setup_requires=['vcversioner'],
66 The presence of a vcversioner argument automagically activates vcversioner
67 and updates the project's version. The parameter to the vcversioner
68 argument can also be a dict of keyword arguments which |find_version|
71 To allow tarballs to be distributed without requiring a ``.git`` (or
73 etc.) directory, vcversioner will also write out a file named (by default)
74 ``version.txt``. Then, if there is no VCS program or the program is unable
76 find any version information, vcversioner will read version information
78 the ``version.txt`` file. However, this file needs to be included in a
79 distributed tarball, so the following line should be added to
84 This isn't necessary if ``setup.py`` will always be run from a checkout,
86 otherwise is essential for vcversioner to know what version to use.
88 The name ``version.txt also can be changed by specifying the version_file``
89 parameter. For example::
91 from setuptools import setup
95 setup_requires=['vcversioner'],
97 'version_file': 'custom_version.txt',
101 For compatibility with `semantic versioning`_, vcversioner will strip
102 leading 'v'\ s from version tags. That is, the tag ``v1.0 will be
103 treated as if it was 1.0``.
105 Other prefixes can be specified to be stripped by using the strip_prefix
106 argument to vcversioner. For compatibility with ``git-dch``, one could
108 the strip_prefix as ``'debian/'``.
113 It's not necessary to depend on vcversioner; while `pip`_ will take care of
114 dependencies automatically, sometimes having a self-contained project is
115 simpler. vcversioner is a single file which is easy to add to a project.
117 copy the entire ``vcversioner.py file adjacent to the existing setup.py``
118 file and update the usage slightly::
120 from setuptools import setup
125 version=vcversioner.find_version().version,
128 This is necessary because the vcversioner distutils hook won't be
136 dae60c17a479781f44a4010701833f1829140b1eeccd258762a74974aa06e19b 9024 vcversioner-2.16.0.0.tar.gz