diff --git a/pyproject.toml b/pyproject.toml index 529ade9..f4bdb1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,3 +57,4 @@ Homepage = "https://rbinvariantslib.readthedocs.io/en/latest/" [tool.setuptools_scm] version_scheme = "post-release" local_scheme = "node-and-date" +write_to = "rbinvariants/_version.py" diff --git a/rbinvariantslib/__init__.py b/rbinvariantslib/__init__.py index 8b13789..53fda93 100644 --- a/rbinvariantslib/__init__.py +++ b/rbinvariantslib/__init__.py @@ -1 +1,7 @@ +try: + from ._version import __version__ + from ._version import version_tuple +except ImportError: + __version__ = "unknown" + version_tuple = (0, 0, "unknown version")