File tree 3 files changed +22
-3
lines changed
3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 19
19
import platform
20
20
import warnings
21
21
22
- from pkg_resources import get_distribution
23
22
from six .moves import collections_abc
24
23
from six .moves .urllib .parse import urlencode
25
24
26
25
from google .api_core .client_info import ClientInfo
27
26
from google .cloud import exceptions
27
+ from google .cloud import version
28
28
29
29
30
30
API_BASE_URL = "https://www.googleapis.com"
31
31
"""The base of the API call URL."""
32
32
33
33
DEFAULT_USER_AGENT = "gcloud-python/{0}" .format (
34
- get_distribution ( "google-cloud-core" ). version
34
+ version . __version__
35
35
)
36
36
"""The user agent for google-cloud-python requests."""
37
37
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 22
22
23
23
name = "google-cloud-core"
24
24
description = "Google Cloud API client core library"
25
- version = "1.4.2"
26
25
# Should be one of:
27
26
# 'Development Status :: 3 - Alpha'
28
27
# 'Development Status :: 4 - Beta'
36
35
37
36
package_root = os .path .abspath (os .path .dirname (__file__ ))
38
37
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
+
39
43
readme_filename = os .path .join (package_root , "README.rst" )
40
44
with io .open (readme_filename , encoding = "utf-8" ) as readme_file :
41
45
readme = readme_file .read ()
You can’t perform that action at this time.
0 commit comments