single-cell-data / SOMA

A flexible and extensible API for annotated 2D matrix data stored in multiple underlying formats.
MIT License
70 stars 9 forks source link

Set up project versioning for PyPI upload. #68

Closed thetorpedodog closed 1 year ago

thetorpedodog commented 1 year ago

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.


A slightly different solution than we use in TileDB-SOMA but lets us have a purely declarative pyproject.toml, with just a bit of extra work in the build process.

thetorpedodog commented 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

mlin commented 1 year ago

@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).