diff --git a/pyproject.toml b/pyproject.toml index 87f05bc..d60b10f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,5 +6,8 @@ requires = [ "wheel" ] +[tool.setuptools_scm] +write_to = "src/sumo/wrapper/version.py" + [tool.black] line-length = 79 \ No newline at end of file diff --git a/src/sumo/wrapper/__init__.py b/src/sumo/wrapper/__init__.py index b9f0c40..dfa8e5a 100644 --- a/src/sumo/wrapper/__init__.py +++ b/src/sumo/wrapper/__init__.py @@ -1,3 +1,10 @@ from .sumo_client import SumoClient +try: + from .version import version + + __version__ = version +except ImportError: + __version__ = "0.0.0" + __all__ = ["SumoClient"]