From 797a9f75a6dab5440bc85f3aae6b0eac3f12fd90 Mon Sep 17 00:00:00 2001 From: Bryan Ricker <978899+bricker@users.noreply.github.com> Date: Wed, 10 May 2023 14:29:10 -0700 Subject: [PATCH 1/4] fix: use version.py instead of pkg_resources.get_distribution --- google/cloud/runtimeconfig/__init__.py | 4 ++-- google/cloud/runtimeconfig/version.py | 15 +++++++++++++++ setup.py | 7 ++++++- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 google/cloud/runtimeconfig/version.py 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..d2dc9b7 --- /dev/null +++ b/google/cloud/runtimeconfig/version.py @@ -0,0 +1,15 @@ +# Copyright 2020 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.2" \ No newline at end of file diff --git a/setup.py b/setup.py index 1bb092f..8b30674 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,12 @@ name = "google-cloud-runtimeconfig" description = "Google Cloud RuntimeConfig API client library" -version = "0.33.2" + +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' From be833f1f9da7a0d941cea5a8ca8dc85a0b0838d1 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 15 Nov 2023 12:02:41 -0500 Subject: [PATCH 2/4] Update version number in version.py --- google/cloud/runtimeconfig/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/cloud/runtimeconfig/version.py b/google/cloud/runtimeconfig/version.py index d2dc9b7..50855f4 100644 --- a/google/cloud/runtimeconfig/version.py +++ b/google/cloud/runtimeconfig/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.33.2" \ No newline at end of file +__version__ = "0.33.3" From 084ac057e2ce8ecc6c275d7a8d6b0da7e0763e17 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 15 Nov 2023 12:03:29 -0500 Subject: [PATCH 3/4] Update copyright year --- google/cloud/runtimeconfig/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/cloud/runtimeconfig/version.py b/google/cloud/runtimeconfig/version.py index 50855f4..c3a4e88 100644 --- a/google/cloud/runtimeconfig/version.py +++ b/google/cloud/runtimeconfig/version.py @@ -1,4 +1,4 @@ -# Copyright 2020 Google LLC +# 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. From 22c7fc9dead9e4207bf4a39e0e2a93c7d98efc52 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 15 Nov 2023 12:12:39 -0500 Subject: [PATCH 4/4] lint --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 007e762..520e26d 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ version = {} with open("google/cloud/runtimeconfig/version.py") as fp: exec(fp.read(), version) -version = version['__version__'] +version = version["__version__"] # Should be one of: