|
1 | 1 | # -*- coding: utf-8 -*- |
2 | | -# Copyright 2022 Google LLC |
| 2 | +# Copyright 2025 Google LLC |
3 | 3 | # |
4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | # you may not use this file except in compliance with the License. |
|
15 | 15 | # |
16 | 16 | import io |
17 | 17 | import os |
| 18 | +import re |
18 | 19 |
|
19 | 20 | import setuptools # type: ignore |
20 | 21 |
|
|
25 | 26 |
|
26 | 27 | description = "Google Cloud Bigquery Storage API client library" |
27 | 28 |
|
28 | | -version = {} |
| 29 | +version = None |
| 30 | + |
29 | 31 | with open( |
30 | 32 | os.path.join(package_root, "google/cloud/bigquery_storage/gapic_version.py") |
31 | 33 | ) as fp: |
32 | | - exec(fp.read(), version) |
33 | | -version = version["__version__"] |
| 34 | + version_candidates = re.findall(r"(?<=\")\d+.\d+.\d+(?=\")", fp.read()) |
| 35 | + assert len(version_candidates) == 1 |
| 36 | + version = version_candidates[0] |
34 | 37 |
|
35 | 38 | if version[0] == "0": |
36 | 39 | release_status = "Development Status :: 4 - Beta" |
37 | 40 | else: |
38 | 41 | release_status = "Development Status :: 5 - Production/Stable" |
39 | 42 |
|
40 | 43 | dependencies = [ |
41 | | - "google-api-core[grpc] >= 1.34.0, <3.0.0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", |
42 | | - "google-auth >= 2.14.1, <3.0.0", |
43 | | - "proto-plus >= 1.22.0, <2.0.0", |
44 | | - "proto-plus >= 1.22.2, <2.0.0; python_version>='3.11'", |
45 | | - "proto-plus >= 1.25.0, <2.0.0; python_version>='3.13'", |
46 | | - "protobuf>=3.20.2,<7.0.0,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", |
| 44 | + "google-api-core[grpc] >= 1.34.1, <3.0.0,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", |
| 45 | + # Exclude incompatible versions of `google-auth` |
| 46 | + # See https://github.com/googleapis/google-cloud-python/issues/12364 |
| 47 | + "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", |
| 48 | + "proto-plus >= 1.22.3, <2.0.0", |
| 49 | + "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", |
| 50 | + "protobuf>=3.20.2,<7.0.0,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", |
47 | 51 | ] |
48 | 52 | extras = { |
49 | 53 | # 'importlib-metadata' is required for Python 3.7 compatibility |
|
95 | 99 | python_requires=">=3.7", |
96 | 100 | install_requires=dependencies, |
97 | 101 | extras_require=extras, |
98 | | - scripts=["scripts/fixup_bigquery_storage_v1_keywords.py"], |
99 | 102 | include_package_data=True, |
100 | 103 | zip_safe=False, |
101 | 104 | ) |
0 commit comments