File tree Expand file tree Collapse file tree 4 files changed +25
-5
lines changed Expand file tree Collapse file tree 4 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 2727import json
2828import logging
2929import platform
30- import pkg_resources
3130
3231from six .moves .urllib .parse import urlencode
3332
33+ from googleapiclient import version as googleapiclient_version
3434from googleapiclient .errors import HttpError
3535
36- _LIBRARY_VERSION = pkg_resources . get_distribution ( "google-api-python-client" ). version
36+ _LIBRARY_VERSION = googleapiclient_version . __version__
3737_PY_VERSION = platform .python_version ()
3838
3939LOGGER = logging .getLogger (__name__ )
Original file line number Diff line number Diff line change 1+ # Copyright 2022 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.12.0"
Original file line number Diff line number Diff line change 5353with io .open (readme_filename , encoding = "utf-8" ) as readme_file :
5454 readme = readme_file .read ()
5555
56- version = "1.12.10"
56+ package_root = os .path .abspath (os .path .dirname (__file__ ))
57+
58+ version = {}
59+ with open (os .path .join (package_root , "googleapiclient/version.py" )) as fp :
60+ exec (fp .read (), version )
61+ version = version ["__version__" ]
5762
5863setup (
5964 name = "google-api-python-client" ,
Original file line number Diff line number Diff line change 2626import copy
2727import json
2828import os
29- import pkg_resources
3029import platform
3130import unittest2 as unittest
3231import httplib2
3332import googleapiclient .model
3433
34+ from googleapiclient import version as googleapiclient_version
3535from googleapiclient .errors import HttpError
3636from googleapiclient .model import JsonModel
3737
3838from six .moves .urllib .parse import parse_qs
3939
40- _LIBRARY_VERSION = pkg_resources . get_distribution ( "google-api-python-client" ). version
40+ _LIBRARY_VERSION = googleapiclient_version . __version__
4141
4242
4343class Model (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments