|
12 | 12 | # See the License for the specific language governing permissions and
|
13 | 13 | # limitations under the License.
|
14 | 14 |
|
15 |
| -import io |
16 |
| -import os |
| 15 | +import setuptools # type: ignore |
17 | 16 |
|
18 |
| -import setuptools |
19 | 17 |
|
20 |
| - |
21 |
| -# Package metadata. |
22 |
| - |
23 |
| -name = "google-cloud-bigquery" |
24 |
| -description = "Google BigQuery API client library" |
25 |
| - |
26 |
| -# Should be one of: |
27 |
| -# 'Development Status :: 3 - Alpha' |
28 |
| -# 'Development Status :: 4 - Beta' |
29 |
| -# 'Development Status :: 5 - Production/Stable' |
30 |
| -release_status = "Development Status :: 5 - Production/Stable" |
31 |
| -dependencies = [ |
32 |
| - "google-api-core[grpc] >= 2.11.1, <3.0.0dev", |
33 |
| - "google-auth >= 2.14.1, <3.0.0dev", |
34 |
| - "google-cloud-core >= 2.4.1, <3.0.0dev", |
35 |
| - "google-resumable-media >= 2.0.0, < 3.0dev", |
36 |
| - "packaging >= 20.0.0", |
37 |
| - "python-dateutil >= 2.7.3, <3.0dev", |
38 |
| - "requests >= 2.21.0, < 3.0.0dev", |
39 |
| -] |
40 |
| -pyarrow_dependency = "pyarrow >= 3.0.0" |
41 |
| -extras = { |
42 |
| - # bqstorage had a period where it was a required dependency, and has been |
43 |
| - # moved back to optional due to bloat. See |
44 |
| - # https://github.com/googleapis/python-bigquery/issues/1196 for more background. |
45 |
| - "bqstorage": [ |
46 |
| - "google-cloud-bigquery-storage >= 2.6.0, <3.0.0dev", |
47 |
| - # Due to an issue in pip's dependency resolver, the `grpc` extra is not |
48 |
| - # installed, even though `google-cloud-bigquery-storage` specifies it |
49 |
| - # as `google-api-core[grpc]`. We thus need to explicitly specify it here. |
50 |
| - # See: https://github.com/googleapis/python-bigquery/issues/83 The |
51 |
| - # grpc.Channel.close() method isn't added until 1.32.0. |
52 |
| - # https://github.com/grpc/grpc/pull/15254 |
53 |
| - "grpcio >= 1.47.0, < 2.0dev", |
54 |
| - "grpcio >= 1.49.1, < 2.0dev; python_version>='3.11'", |
55 |
| - pyarrow_dependency, |
56 |
| - ], |
57 |
| - "pandas": [ |
58 |
| - "pandas>=1.1.0", |
59 |
| - pyarrow_dependency, |
60 |
| - "db-dtypes>=0.3.0,<2.0.0dev", |
61 |
| - "importlib_metadata>=1.0.0; python_version<'3.8'", |
62 |
| - ], |
63 |
| - "ipywidgets": [ |
64 |
| - "ipywidgets>=7.7.0", |
65 |
| - "ipykernel>=6.0.0", |
66 |
| - ], |
67 |
| - "geopandas": ["geopandas>=0.9.0, <1.0dev", "Shapely>=1.8.4, <3.0.0dev"], |
68 |
| - "ipython": [ |
69 |
| - "bigquery-magics >= 0.1.0", |
70 |
| - ], |
71 |
| - "tqdm": ["tqdm >= 4.7.4, <5.0.0dev"], |
72 |
| - "opentelemetry": [ |
73 |
| - "opentelemetry-api >= 1.1.0", |
74 |
| - "opentelemetry-sdk >= 1.1.0", |
75 |
| - "opentelemetry-instrumentation >= 0.20b0", |
76 |
| - ], |
77 |
| - "bigquery_v2": [ |
78 |
| - "proto-plus >= 1.22.3, <2.0.0dev", |
79 |
| - "protobuf>=3.20.2,<6.0.0dev,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", # For the legacy proto-based types. |
80 |
| - ], |
81 |
| -} |
82 |
| - |
83 |
| -all_extras = [] |
84 |
| - |
85 |
| -for extra in extras: |
86 |
| - all_extras.extend(extras[extra]) |
87 |
| - |
88 |
| -extras["all"] = all_extras |
89 |
| - |
90 |
| -# Setup boilerplate below this line. |
91 |
| - |
92 |
| -package_root = os.path.abspath(os.path.dirname(__file__)) |
93 |
| - |
94 |
| -readme_filename = os.path.join(package_root, "README.rst") |
95 |
| -with io.open(readme_filename, encoding="utf-8") as readme_file: |
96 |
| - readme = readme_file.read() |
97 |
| - |
98 |
| -version = {} |
99 |
| -with open(os.path.join(package_root, "google/cloud/bigquery/version.py")) as fp: |
100 |
| - exec(fp.read(), version) |
101 |
| -version = version["__version__"] |
102 |
| - |
103 |
| -# Only include packages under the 'google' namespace. Do not include tests, |
104 |
| -# benchmarks, etc. |
105 |
| -packages = [ |
106 |
| - package |
107 |
| - for package in setuptools.find_namespace_packages() |
108 |
| - if package.startswith("google") |
109 |
| -] |
110 |
| - |
111 |
| -setuptools.setup( |
112 |
| - name=name, |
113 |
| - version=version, |
114 |
| - description=description, |
115 |
| - long_description=readme, |
116 |
| - author="Google LLC", |
117 |
| - |
118 |
| - license="Apache 2.0", |
119 |
| - url="https://github.com/googleapis/python-bigquery", |
120 |
| - classifiers=[ |
121 |
| - release_status, |
122 |
| - "Intended Audience :: Developers", |
123 |
| - "License :: OSI Approved :: Apache Software License", |
124 |
| - "Programming Language :: Python", |
125 |
| - "Programming Language :: Python :: 3", |
126 |
| - "Programming Language :: Python :: 3.7", |
127 |
| - "Programming Language :: Python :: 3.8", |
128 |
| - "Programming Language :: Python :: 3.9", |
129 |
| - "Programming Language :: Python :: 3.10", |
130 |
| - "Programming Language :: Python :: 3.11", |
131 |
| - "Programming Language :: Python :: 3.12", |
132 |
| - "Operating System :: OS Independent", |
133 |
| - "Topic :: Internet", |
134 |
| - ], |
135 |
| - platforms="Posix; MacOS X; Windows", |
136 |
| - packages=packages, |
137 |
| - install_requires=dependencies, |
138 |
| - extras_require=extras, |
139 |
| - python_requires=">=3.7", |
140 |
| - include_package_data=True, |
141 |
| - zip_safe=False, |
142 |
| -) |
| 18 | +setuptools.setup() |
0 commit comments