diff --git a/marimo_labs/__init__.py b/marimo_labs/__init__.py index b319b66..9e3e4a3 100644 --- a/marimo_labs/__init__.py +++ b/marimo_labs/__init__.py @@ -1,5 +1,12 @@ -__version__ = "0.1.0" - -__all__ = ["huggingface"] +import importlib.metadata +import warnings import marimo_labs.huggingface as huggingface + +try: + __version__ = importlib.metadata.version(__name__) +except importlib.metadata.PackageNotFoundError as e: + warnings.warn(f"Could not determine version of {__name__}\n{e!r}", stacklevel=2) + __version__ = "unknown" + +__all__ = ["huggingface"] diff --git a/pyproject.toml b/pyproject.toml index 397d50a..418a337 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "marimo_labs" description = "Cutting-edge experimental features for marimo" -dynamic = ["version"] +version = "0.1.0" dependencies = [ "marimo>=0.3.8", "huggingface_hub>=0.19.3", @@ -46,9 +46,6 @@ dev = [ "pytest~=8.1.1", ] -[tool.setuptools.dynamic] -version = { attr = "marimo_labs.__version__" } - [tool.setuptools.packages.find] # project source is entirely contained in the `marimo` package include = ["marimo_labs*"]