File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed
packages/google-cloud-core Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 1919import platform
2020import warnings
2121
22- from pkg_resources import get_distribution
2322from six .moves import collections_abc
2423from six .moves .urllib .parse import urlencode
2524
2625from google .api_core .client_info import ClientInfo
2726from google .cloud import exceptions
27+ from google .cloud import version
2828
2929
3030API_BASE_URL = "https://www.googleapis.com"
3131"""The base of the API call URL."""
3232
3333DEFAULT_USER_AGENT = "gcloud-python/{0}" .format (
34- get_distribution ( "google-cloud-core" ). version
34+ version . __version__
3535)
3636"""The user agent for google-cloud-python requests."""
3737
Original file line number Diff line number Diff line change 1+ # Copyright 2020 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ __version__ = "1.4.2"
Original file line number Diff line number Diff line change 2222
2323name = "google-cloud-core"
2424description = "Google Cloud API client core library"
25- version = "1.4.2"
2625# Should be one of:
2726# 'Development Status :: 3 - Alpha'
2827# 'Development Status :: 4 - Beta'
3635
3736package_root = os .path .abspath (os .path .dirname (__file__ ))
3837
38+ version = {}
39+ with open (os .path .join (package_root , "google/cloud/version.py" )) as fp :
40+ exec (fp .read (), version )
41+ version = version ['__version__' ]
42+
3943readme_filename = os .path .join (package_root , "README.rst" )
4044with io .open (readme_filename , encoding = "utf-8" ) as readme_file :
4145 readme = readme_file .read ()
You can’t perform that action at this time.
0 commit comments