diff --git a/.github/workflows/pythonpublish.yaml b/.github/workflows/pythonpublish.yaml index 82a3892..9bf8e6a 100644 --- a/.github/workflows/pythonpublish.yaml +++ b/.github/workflows/pythonpublish.yaml @@ -25,7 +25,7 @@ jobs: python --version - name: Check current package version run: | - python setup.py --version + python -c "import pangeo_forge_esgf; print(pangeo_forge_esgf.__version__) - name: Build tarball and wheels run: | git clean -xdf diff --git a/pangeo_forge_esgf/__init__.py b/pangeo_forge_esgf/__init__.py index f385b6d..b908c7f 100644 --- a/pangeo_forge_esgf/__init__.py +++ b/pangeo_forge_esgf/__init__.py @@ -2,6 +2,11 @@ import logging import backoff # noqa #https://github.com/litl/backoff/issues/71 +try: + from ._version import __version__ +except ImportError: + __version__ = "unknown" + logging.getLogger("backoff").setLevel(logging.FATAL) # not sure if this is needed, but I want to avoid the many backoff messages