Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb8f502b

Browse files
fix: use version.py instead of pkg_resources.get_distribution (#307)
* fix: use version.py instead of pkg_resources.get_distribution* fix: nit
1 parent35627d1 commitb8f502b

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

‎google/cloud/bigquery/__init__.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
"""
2929

3030

31-
frompkg_resourcesimportget_distribution
31+
fromgoogle.cloud.bigqueryimportversionasbigquery_version
3232

33-
__version__=get_distribution("google-cloud-bigquery").version
33+
__version__=bigquery_version.__version__
3434

3535
fromgoogle.cloud.bigquery.clientimportClient
3636
fromgoogle.cloud.bigquery.datasetimportAccessEntry

‎google/cloud/bigquery/version.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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__="2.1.0"

‎setup.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
name="google-cloud-bigquery"
2424
description="Google BigQuery API client library"
25-
version="2.1.0"
25+
2626
# Should be one of:
2727
# 'Development Status :: 3 - Alpha'
2828
# 'Development Status :: 4 - Beta'
@@ -83,6 +83,11 @@
8383
withio.open(readme_filename,encoding="utf-8")asreadme_file:
8484
readme=readme_file.read()
8585

86+
version= {}
87+
withopen(os.path.join(package_root,"google/cloud/bigquery/version.py"))asfp:
88+
exec(fp.read(),version)
89+
version=version["__version__"]
90+
8691
# Only include packages under the 'google' namespace. Do not include tests,
8792
# benchmarks, etc.
8893
packages= [

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp