diff --git a/google/cloud/runtimeconfig/__init__.py b/google/cloud/runtimeconfig/__init__.py index 5078041..3772e8f 100644 --- a/google/cloud/runtimeconfig/__init__.py +++ b/google/cloud/runtimeconfig/__init__.py @@ -15,9 +15,9 @@ """Google Cloud Runtime Configurator API package.""" -from pkg_resources import get_distribution +from google.cloud.runtimeconfig import version as runtimeconfig_version -__version__ = get_distribution("google-cloud-runtimeconfig").version +__version__ = runtimeconfig_version.__version__ from google.cloud.runtimeconfig.client import Client diff --git a/google/cloud/runtimeconfig/version.py b/google/cloud/runtimeconfig/version.py new file mode 100644 index 0000000..c3a4e88 --- /dev/null +++ b/google/cloud/runtimeconfig/version.py @@ -0,0 +1,15 @@ +# Copyright 2023 Google LLC +# +# 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. + +__version__ = "0.33.3" diff --git a/setup.py b/setup.py index eab5647..520e26d 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,13 @@ name = "google-cloud-runtimeconfig" description = "Google Cloud RuntimeConfig API client library" -version = "0.33.3" + +version = {} +with open("google/cloud/runtimeconfig/version.py") as fp: + exec(fp.read(), version) +version = version["__version__"] + + # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta'