[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Versioneer [was Re: a review of your bumblebee-status package]



On Tue, 2022-06-07 at 16:12 +0200, Timo Röhling wrote:

> Versioneer is meant to simplify version tracking for the developer;
> it supports a number of authoritative sources such as "git
> describe" to determine the current version number. There are two
> modes of operation:
> 
> - in developer mode, versioneer detects the version number
>    dynamically. This is what you'll see if you use the (Git)
>    repository sources.
> - in install mode, the release version number is statically
>    embedded. This is what you'll see if
>    you download from PyPI.
> 
> Internally, these modes are realized by two different _version.py
> files; the developer version is usually added to version control,
> and the setuptools "build" and "sdist" steps are
> intercepted to insert the static _version.py as needed.

Personally I would not use the _version.py file from PyPI.

Sounds like the more correct thing to do is clone the GitHub repo,
check out the tag that Debian will use, run the build step, save the
generated _version.py file, add a patch containing that _version.py to
the Debian source package and generate an orig.tar from `git archive`.

Alternatively, upstream could switch from versioneer to flit-scm or
setuptools-scm, which both allow reporting the version number through
an environment variable, which IIRC pybuild does automatically.

Upstream should really drop the vendored versioneer either way though.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: