|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# Copyright 2022 Google LLC |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | +# |
| 16 | +import io |
| 17 | +import os |
| 18 | + |
| 19 | +import setuptools # type: ignore |
| 20 | + |
| 21 | +package_root = os.path.abspath(os.path.dirname(__file__)) |
| 22 | + |
| 23 | +name = "google-cloud-spanner" |
| 24 | + |
| 25 | + |
| 26 | +description = "Google Cloud Spanner API client library" |
| 27 | + |
| 28 | +version = {} |
| 29 | +with open(os.path.join(package_root, "google/cloud/spanner_v1/gapic_version.py")) as fp: |
| 30 | + exec(fp.read(), version) |
| 31 | +version = version["__version__"] |
| 32 | + |
| 33 | +if version[0] == "0": |
| 34 | + release_status = "Development Status :: 4 - Beta" |
| 35 | +else: |
| 36 | + release_status = "Development Status :: 5 - Production/Stable" |
| 37 | + |
| 38 | +dependencies = [ |
| 39 | + "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.*", |
| 40 | + "google-cloud-core >= 1.4.4, < 3.0.0", |
| 41 | + "grpc-google-iam-v1 >= 0.12.4, <1.0.0", |
| 42 | + "proto-plus >= 1.22.0, <2.0.0", |
| 43 | + "sqlparse >= 0.4.4", |
| 44 | + "proto-plus >= 1.22.2, <2.0.0; python_version>='3.11'", |
| 45 | + "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", |
| 46 | + "grpc-interceptor >= 0.15.4", |
| 47 | +] |
| 48 | +extras = { |
| 49 | + "tracing": [ |
| 50 | + "opentelemetry-api >= 1.22.0", |
| 51 | + "opentelemetry-sdk >= 1.22.0", |
| 52 | + "opentelemetry-semantic-conventions >= 0.43b0", |
| 53 | + "opentelemetry-resourcedetector-gcp >= 1.8.0a0", |
| 54 | + "google-cloud-monitoring >= 2.16.0", |
| 55 | + "mmh3 >= 4.1.0 ", |
| 56 | + ], |
| 57 | + "libcst": "libcst >= 0.2.5", |
| 58 | +} |
| 59 | + |
| 60 | +url = "https://github.com/googleapis/python-spanner" |
| 61 | + |
| 62 | +package_root = os.path.abspath(os.path.dirname(__file__)) |
| 63 | + |
| 64 | +readme_filename = os.path.join(package_root, "README.rst") |
| 65 | +with io.open(readme_filename, encoding="utf-8") as readme_file: |
| 66 | + readme = readme_file.read() |
| 67 | + |
| 68 | +packages = [ |
| 69 | + package |
| 70 | + for package in setuptools.find_namespace_packages() |
| 71 | + if package.startswith("google") |
| 72 | +] |
| 73 | + |
| 74 | +setuptools.setup( |
| 75 | + name=name, |
| 76 | + version=version, |
| 77 | + description=description, |
| 78 | + long_description=readme, |
| 79 | + author="Google LLC", |
| 80 | + author_email="googleapis-packages@google.com", |
| 81 | + license="Apache 2.0", |
| 82 | + url=url, |
| 83 | + classifiers=[ |
| 84 | + release_status, |
| 85 | + "Intended Audience :: Developers", |
| 86 | + "License :: OSI Approved :: Apache Software License", |
| 87 | + "Programming Language :: Python", |
| 88 | + "Programming Language :: Python :: 3", |
| 89 | + "Programming Language :: Python :: 3.9", |
| 90 | + "Programming Language :: Python :: 3.10", |
| 91 | + "Programming Language :: Python :: 3.11", |
| 92 | + "Programming Language :: Python :: 3.12", |
| 93 | + "Operating System :: OS Independent", |
| 94 | + "Topic :: Internet", |
| 95 | + ], |
| 96 | + platforms="Posix; MacOS X; Windows", |
| 97 | + packages=packages, |
| 98 | + install_requires=dependencies, |
| 99 | + extras_require=extras, |
| 100 | + python_requires=">=3.9", |
| 101 | + include_package_data=True, |
| 102 | + zip_safe=False, |
| 103 | +) |
0 commit comments