diff --git a/intake_esgf/__init__.py b/intake_esgf/__init__.py index df05071..4a8f980 100644 --- a/intake_esgf/__init__.py +++ b/intake_esgf/__init__.py @@ -3,7 +3,6 @@ import warnings import xarray as xr -from pkg_resources import DistributionNotFound, get_distribution warnings.simplefilter("ignore", category=xr.SerializationWarning) @@ -26,10 +25,6 @@ def in_notebook() -> bool: from intake_esgf.catalog import ESGFCatalog # noqa from intake_esgf.config import conf # noqa +from intake_esgf._version import __version__ # noqa __all__ = ["ESGFCatalog", "conf", "IN_NOTEBOOK"] - -try: - __version__ = get_distribution(__name__).version -except DistributionNotFound: # pragma: no cover - __version__ = "0.0.0" # pragma: no cover diff --git a/pyproject.toml b/pyproject.toml index 6d78ec3..ae40701 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,10 @@ build-backend = "setuptools.build_meta" [tool.setuptools_scm] version_scheme = "no-guess-dev" +local_scheme = "node-and-date" +fallback_version = "0.0.0" +write_to = "intake_esgf/_version.py" +write_to_template = '__version__ = "{version}"' [tool.pytest.ini_options] console_output_style = "count"