diff --git a/google/cloud/bigquery_storage_v1/__init__.py b/google/cloud/bigquery_storage_v1/__init__.py index 4ccfd350..189eacad 100644 --- a/google/cloud/bigquery_storage_v1/__init__.py +++ b/google/cloud/bigquery_storage_v1/__init__.py @@ -16,11 +16,9 @@ from __future__ import absolute_import -import pkg_resources +from google.cloud.bigquery_storage_v1 import version as bigquery_storage_version -__version__ = pkg_resources.get_distribution( - "google-cloud-bigquery-storage" -).version # noqa +__version__ = bigquery_storage_version.__version__ from google.cloud.bigquery_storage_v1 import client from google.cloud.bigquery_storage_v1 import types diff --git a/google/cloud/bigquery_storage_v1/version.py b/google/cloud/bigquery_storage_v1/version.py new file mode 100644 index 00000000..d4957902 --- /dev/null +++ b/google/cloud/bigquery_storage_v1/version.py @@ -0,0 +1,15 @@ +# Copyright 2022 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__ = "2.6.12" diff --git a/setup.py b/setup.py index 52df2348..f0e45bc9 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,6 @@ name = "google-cloud-bigquery-storage" description = "BigQuery Storage API API client library" -version = "2.16.2" release_status = "Development Status :: 5 - Production/Stable" dependencies = [ "google-api-core[grpc] >= 1.32.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", @@ -36,6 +35,11 @@ package_root = os.path.abspath(os.path.dirname(__file__)) +version = {} +with open(os.path.join(package_root, "google/cloud/bigquery_storage_v1/version.py")) as fp: + exec(fp.read(), version) +version = version["__version__"] + readme_filename = os.path.join(package_root, "README.rst") with io.open(readme_filename, encoding="utf-8") as readme_file: readme = readme_file.read()