On 7/12/24 12:59, Paul Boddie wrote:
I suppose what I don't understand is the role of
setuptools_scm in building a package for installation (or the construction of
a binary package).
It has no role in it. For us (package maintainers), it's just an
annoyance that we need to deal with. For Python upstream, it's useful...
The way to deal with it, is simply something like this:
export SETUPTOOLS_SCM_PRETEND_VERSION=$(shell dpkg-parsechangelog
-SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~git.*//'
-e 's/~/.0/' -e 's/+dfsg1//' -e 's/+ds1//' | head -n 1)
and then setuptools-scm knows what version to use without using the Git
history.
Probably pybuild does that automatically under the hood (I tend to not
use pybuild, and so I do the above ...).
Cheers,
Thomas Goirand (zigo)