Skip to content

Commit

Permalink
fix __version__
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Sep 14, 2022
1 parent 0fc17c8 commit 38af420
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions apis/python/src/tiledbsoma/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
# ----------------------------------------------------------------
# The way this works is:
#
# o We put a `[tool.setuptools_scm]` stanza in pyproject.toml.
#
# o When the user does `pip install .` the src/tiledbsoma/_version.py
# file gets created. We have a .gitignore line for that since it
# isn't supposed to go into version control, but rather, is supposed
# to be created at package-setup time.
#
# o The src/tiledbsoma/_version.py is created by setuptools by reading
# Git history. If the currently checked-out code is at a version stamp
# like `1.2.3` we'll get `__version__` being `1.2.3`; else we'll get
# something like `1.2.4.dev2`.
#
# o When the user does `import tiledbsoma` this code here is run,
# which loads the `src/tiledbsoma/_version.py`.
#
# In summary, who needs to do what:
#
# o Package developers: simply create a Git release at
# https://github.com/single-cell-data/TileDB-SingleCell/releases
#
# o Package users: just `pip install .`.
try:
from ._version import version as __version__
except ImportError:
from pkg_resources import DistributionNotFound, get_distribution

try:
__version__ = get_distribution("tiledbsoma").version
except DistributionNotFound:
__version__ = "unknown"
# ----------------------------------------------------------------

from .general_utilities import get_implementation, get_storage_engine, get_version
from .soma_collection import SOMACollection
from .soma_dataframe import SOMADataFrame
Expand Down

0 comments on commit 38af420

Please sign in to comment.