diff --git a/bento/__init__.py b/bento/__init__.py index e3baf20..7e27caa 100644 --- a/bento/__init__.py +++ b/bento/__init__.py @@ -1,4 +1,4 @@ -from ._version import __version__ +__version__ = "2.1.4.post2" from . import _utils as ut from . import geometry as geo @@ -7,4 +7,4 @@ from . import datasets as ds from . import io from .plotting import _colors as colors -from ._constants import CosMx, Merscope, Xenium \ No newline at end of file +from ._constants import CosMx, Merscope, Xenium diff --git a/bento/_version.py b/bento/_version.py deleted file mode 100644 index 980735c..0000000 --- a/bento/_version.py +++ /dev/null @@ -1,15 +0,0 @@ -import tomli - -def get_version(): - import os - import pathlib - - package_dir = pathlib.Path(__file__).parent - pyproject_path = os.path.join(package_dir, "pyproject.toml") - - with open(pyproject_path, "rb") as f: - pyproject = tomli.load(f) - return pyproject["project"]["version"] - -__version__ = get_version() - diff --git a/pyproject.toml b/pyproject.toml index 1bf2fef..ac1a3d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,7 @@ name = "bento-tools" description = "A toolkit for subcellular analysis of spatial transcriptomics data" authors = [{ name = "ckmah", email = "clarence.k.mah@gmail.com" }] +dynamic = ["version"] dependencies = [ "adjusttext>=1.1.1", "astropy>=6.0.1", @@ -30,7 +31,6 @@ dependencies = [ license = "BSD-2-Clause" readme = "README.md" requires-python = ">= 3.10" -version = "2.1.4.post1" [project.optional-dependencies] @@ -76,4 +76,4 @@ include = ["bento"] packages = ["bento"] [tool.hatch.version] -path = "bento/_version.py" +path = "bento/__init__.py"