Closed thetorpedodog closed 1 year ago
@mlin this has a slightly different set of constraints than the way you do versioning on TileDB-SOMA
but you might be interested in this solution
@thetorpedodog LGTM thanks; I have no particular attachment to the ad hoc version.py script used in TileDB-SOMA, I just switched to something I knew works ok after reading the setuptools_scm issues threads. The script does work reasonably well in the local checkout case (i.e. gives you a meaningful version number incl. '-dirty' if applicable, by looking at git status).
Because our project is not at the root of our Git repository, we can't use straight
setuptools_scm
, so we do a little extra work.write-version-file
before runningbuild
/twine
.A slightly different solution than we use in
TileDB-SOMA
but lets us have a purely declarativepyproject.toml
, with just a bit of extra work in the build process.