diff --git a/py/pyproject.toml b/py/pyproject.toml index 56e71f5..76669ac 100644 --- a/py/pyproject.toml +++ b/py/pyproject.toml @@ -4,13 +4,12 @@ build-backend = "setuptools.build_meta" [project] name = "llnl-clippy" -version = "0.5.3" authors = [ { name="Roger Pearce"}, { name="Seth Bromberger"} ] description="A Python interface to HPC resources" readme = "README.md" -dynamic = ["dependencies", "optional-dependencies"] +dynamic = ["dependencies", "optional-dependencies", "version"] requires-python = ">=3.10" @@ -24,6 +23,7 @@ classifiers = [ ] [tool.setuptools.dynamic] +version = {file = "src/clippy/VERSION"} dependencies = {file = ["requirements.txt"]} optional-dependencies = {dev = {file = ["requirements-dev.txt"] }} diff --git a/py/src/clippy/VERSION b/py/src/clippy/VERSION new file mode 100644 index 0000000..7d85683 --- /dev/null +++ b/py/src/clippy/VERSION @@ -0,0 +1 @@ +0.5.4 diff --git a/py/src/clippy/__init__.py b/py/src/clippy/__init__.py index f8319a3..aae2f34 100644 --- a/py/src/clippy/__init__.py +++ b/py/src/clippy/__init__.py @@ -7,10 +7,13 @@ import importlib import logging +from pathlib import Path from .clippy_types import CLIPPY_CONFIG, AnyDict from .config import _clippy_cfg +__version__ = (Path(__file__).parent / "VERSION").read_text().strip() + # Create the main configuraton object and expose it globally. cfg = CLIPPY_CONFIG(_clippy_cfg)