Skip to content

Replace versioneer with hand-rolled version generation code.

Administrator requested to merge github/fork/tp-la/handrolled-version into main

Created by: tomprince

The version of versioneer has an issue that the tarball that is generated on github changes, when the branches and/or tags refering to a commit change. This causes issues for gridsync, which pins the hashes of those tarballs.

In addition to that, versioneer doesn't provide a meaningful revision for untagged commits, when run from a github tarball.

Given that we only ever consume a github tarball as a github archive (except in local development, where the version number is less important), this replaces versioneer with some hand-rolled code specialized to that use case.

The options for pre-existing code to do something similar that I am aware of, setuptools_scm and versioneer, are both python 3 only in their current versions, and neither of them support $Format:%(describe)$ (which was added in git 2.32, which allows to to get the distance from the last tag in an archive.

To get this to work, I've push an annotated tag v0.0 to the repository, pointing at the first commit. (the unreleased git 2.35 drops the requirement for the tag being annotated.

Merge request reports