diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 437dadb3..b3588c82 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -3,4 +3,5 @@ current_version = 1.0.0 commit = False tag = False +[bumpversion:file:thousandeyes-sdk-core/src/thousandeyes_sdk/core/__init__.py] [bumpversion:file:.version] diff --git a/thousandeyes-sdk-core/pyproject.toml b/thousandeyes-sdk-core/pyproject.toml index 0dbec9ed..9d276ee9 100644 --- a/thousandeyes-sdk-core/pyproject.toml +++ b/thousandeyes-sdk-core/pyproject.toml @@ -18,7 +18,7 @@ where = ["src/"] include = ["thousandeyes_sdk.core"] [tool.setuptools.dynamic] -version = {file = ".version"} +version = {attr = "thousandeyes_sdk.core.__version__"} [project.optional-dependencies] test = [ diff --git a/thousandeyes-sdk-core/src/thousandeyes_sdk/core/__init__.py b/thousandeyes-sdk-core/src/thousandeyes_sdk/core/__init__.py new file mode 100644 index 00000000..0f9854f3 --- /dev/null +++ b/thousandeyes-sdk-core/src/thousandeyes_sdk/core/__init__.py @@ -0,0 +1,25 @@ +# Copyright 2024 Cisco Systems, Inc. and its affiliates +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +from . import exceptions +from .api_client import ApiClient +from .api_response import ApiResponse +from .configuration import Configuration +from .version import Version + +import os.path + +__version__ = "1.0.0" diff --git a/thousandeyes-sdk-core/src/thousandeyes_sdk/core/version.py b/thousandeyes-sdk-core/src/thousandeyes_sdk/core/version.py new file mode 100644 index 00000000..c7e4c097 --- /dev/null +++ b/thousandeyes-sdk-core/src/thousandeyes_sdk/core/version.py @@ -0,0 +1,22 @@ +# Copyright 2024 Cisco Systems, Inc. and its affiliates +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +import thousandeyes_sdk.core + +class Version: + @staticmethod + def get() -> str: + return thousandeyes_sdk.core.__version__