diff --git a/python_modules/libraries/dagster-looker/dagster_looker/__init__.py b/python_modules/libraries/dagster-looker/dagster_looker/__init__.py index 2092ac8ac45b6..e5161f4050cd6 100644 --- a/python_modules/libraries/dagster-looker/dagster_looker/__init__.py +++ b/python_modules/libraries/dagster-looker/dagster_looker/__init__.py @@ -1,7 +1,5 @@ from dagster._core.libraries import DagsterLibraryRegistry -# Move back to version.py and edit setup.py once we are ready to publish. -__version__ = "1!0+dev" - +from .version import __version__ as __version__ DagsterLibraryRegistry.register("dagster-looker", __version__) diff --git a/python_modules/libraries/dagster-looker/dagster_looker/version.py b/python_modules/libraries/dagster-looker/dagster_looker/version.py new file mode 100644 index 0000000000000..fe3fd8a8248b6 --- /dev/null +++ b/python_modules/libraries/dagster-looker/dagster_looker/version.py @@ -0,0 +1 @@ +__version__ = "1!0+dev" diff --git a/python_modules/libraries/dagster-looker/setup.py b/python_modules/libraries/dagster-looker/setup.py index 5a08b303f92d2..18b6a6247e40d 100644 --- a/python_modules/libraries/dagster-looker/setup.py +++ b/python_modules/libraries/dagster-looker/setup.py @@ -1,8 +1,15 @@ +from pathlib import Path +from typing import Dict + from setuptools import find_packages, setup def get_version() -> str: - return "1!0+dev" + version: Dict[str, str] = {} + with open(Path(__file__).parent / "dagster_looker/version.py", encoding="utf8") as fp: + exec(fp.read(), version) + + return version["__version__"] ver = get_version()