Open johnkerl opened 3 months ago
I need to assign this to @jdblischak but he's not in this repo -- I'll add him
I confirmed the problem locally:
# PyPI
python -m venv ./cellxgene
./cellxgene/bin/python -m pip install cellxgene-census
## Collecting cellxgene-census
## Downloading cellxgene_census-1.14.1-py3-none-any.whl (47 kB)
./cellxgene/bin/python -c "import cellxgene_census; print(cellxgene_census.__version__)"
## 1.14.1
# conda
mamba create --yes -n cellxgene -c conda-forge -c tiledb python=3.9 cellxgene-census
## + cellxgene-census 1.14.1 pyh4471522_0 tiledb 43kB
mamba activate cellxgene
python -c "import cellxgene_census; print(cellxgene_census.__version__)"
## 0.1.dev1+g54893c9.d20240617
I suspect this is a setuptools-scm issue like we've seen previously for TileDB-VCF.
The Python package uses a dynamic version via setuptools-scm:
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "cellxgene-census"
dynamic = ["version"]
And the conda recipe downloads the PyPI source tarball, which has no Git repo associated with it:
But the PyPI source tarball does include a PKG-INFO
that has the correct version specified. And when I install the source tarball locally (ie with no Git repository), it gets the version correct, so why doesn't the same thing happen during the conda build?
wget https://pypi.io/packages/source/c/cellxgene-census/cellxgene_census-1.14.1.tar.gz
python -m venv ./cellxgene-source
./cellxgene-source/bin/python -m pip install cellxgene_census-1.14.1.tar.gz
## Building wheels for collected packages: cellxgene-census
## Building wheel for cellxgene-census (pyproject.toml) ... done
## Created wheel for cellxgene-census: filename=cellxgene_census-1.14.1-py3-none-any.whl size=47383 sha256=eb2265dcb98ef741f823193785d09a0fc76295bc705c6c4c286475600ea12b54
./cellxgene-source/bin/python -c "import cellxgene_census; print(cellxgene_census.__version__)"
## 1.14.1
@jdblischak weerd
I don't know much about this -- at all! -- happy to dig in from scratch if it helps ...
I would note that tiledbsoma (IIRC) we solved the same problem ...
SOMA doesn't use setuptools-scm. It uses a bespoke version.py
. I'll continue investigating tomorrow. Worst case we can update this recipe to pull directly from the GitHub repo. It's not on conda-forge, so we can be more flexible.
Oh nuts, sorry @jdblischak ! @nguyenv and/or @thetorpedodog may know more off top head than I do.
After conda-install in TileDB Cloud we see
The code itself is OK -- it seems the version-printer is not.