diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-26 13:21:31 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-26 14:17:44 +0900 |
commit | 4be462d3a43e2d32c1d2115737acefe632c48ccc (patch) | |
tree | 11771525bc71201f18b74abb3ab66883d3689f4b /setup.cfg | |
parent | 54633e92b103a9b5a8d9b9f3f4591363dcab22b2 (diff) | |
download | buildstream-4be462d3a43e2d32c1d2115737acefe632c48ccc.tar.gz |
Use versioneer instead of setuptools_scm
Using setuptools_scm had a couple of bad problems:
o Unexpected versioning semantics, setuptools_scm would
increment the micro version by itself in the case that
we derive a version number from something that is not a tag,
making the assumption that we are "leading up to" the next
micro version.
People mostly dont expect this.
o When installing in developer mode, i.e. with `pip3 install --user -e .`,
then we were always picking the generated version at install time
and never again dynamically resolving it.
Many of our users install this way and update through git, so it's
important that we report more precise versions all the time.
This commit needs to make a series of changes at the same time:
o Adds versioneer.py to the toplevel, this is used by setup.py
for various activities.
This is modified only to inform the linter to skip
o Adds buildstream/_version.py, which is generated by versioneer
and gives us the machinery to automatically derive the correct version
This is modified only to inform the linter to skip
o Adds a .gitattributes file which informs git to substitute
the buildstream/_version.py file, this is just to ensure that
the versioning output would work if ever we used `git archive`
to release a tarball.
o Modifies setup.py and setup.cfg for versioneer
o Modifies utils.py and _frontend/cli.py such as to avoid importing
the derived version when running bash completion mode, we dont
derive the version at completion time because this can result
in running a subprocess (when running in developer install mode)
and is an undesirable overhead.
o Updates tests/frontend/version.py to expect changed version output
Diffstat (limited to 'setup.cfg')
-rw-r--r-- | setup.cfg | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,11 @@ +[versioneer] +VCS = git +style = pep440 +versionfile_source = buildstream/_version.py +versionfile_build = buildstream/_version.py +tag_prefix = +parentdir_prefix = BuildStream- + [aliases] test=pytest |