Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 1 | # Copyright 2018 Google LLC |
Jon Wayne Parrott | 77fb0f2 | 2017-10-18 12:52:35 -0700 | [diff] [blame] | 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 | |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 15 | import io |
Jon Wayne Parrott | 77fb0f2 | 2017-10-18 12:52:35 -0700 | [diff] [blame] | 16 | import os |
| 17 | |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 18 | import setuptools |
Jon Wayne Parrott | 77fb0f2 | 2017-10-18 12:52:35 -0700 | [diff] [blame] | 19 | |
| 20 | |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 21 | # Package metadata. |
Jon Wayne Parrott | 77fb0f2 | 2017-10-18 12:52:35 -0700 | [diff] [blame] | 22 | |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 23 | name = "google-api-core" |
| 24 | description = "Google API client core library" |
Christopher Wilcox | d480d97 | 2020-10-05 12:06:00 -0700 | [diff] [blame] | 25 | |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 26 | # Should be one of: |
| 27 | # 'Development Status :: 3 - Alpha' |
| 28 | # 'Development Status :: 4 - Beta' |
Jon Wayne Parrott | a7309d7 | 2018-03-15 08:52:22 -0700 | [diff] [blame] | 29 | # 'Development Status :: 5 - Production/Stable' |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 30 | release_status = "Development Status :: 5 - Production/Stable" |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 31 | dependencies = [ |
Tres Seaver | 13eea09 | 2019-07-17 14:46:56 -0400 | [diff] [blame] | 32 | "googleapis-common-protos >= 1.6.0, < 2.0dev", |
Bu Sun Kim | 1ba6095 | 2020-06-16 09:40:08 -0700 | [diff] [blame] | 33 | "protobuf >= 3.12.0", |
Bu Sun Kim | 155da5e | 2021-05-20 09:02:17 -0600 | [diff] [blame] | 34 | "google-auth >= 1.25.0, < 2.0dev", |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 35 | "requests >= 2.18.0, < 3.0.0dev", |
Bu Sun Kim | c5fee89 | 2021-01-13 14:46:03 -0700 | [diff] [blame] | 36 | "setuptools >= 40.3.0", |
Bu Sun Kim | 94c76e0 | 2021-02-05 10:26:54 -0700 | [diff] [blame] | 37 | "packaging >= 14.3", |
Bu Sun Kim | a7a8b98 | 2020-10-02 14:07:39 -0600 | [diff] [blame] | 38 | "six >= 1.13.0", |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 39 | "pytz", |
| 40 | 'futures >= 3.2.0; python_version < "3.2"', |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 41 | ] |
| 42 | extras = { |
Lidi Zheng | 4b11422 | 2020-06-05 19:21:33 -0700 | [diff] [blame] | 43 | "grpc": "grpcio >= 1.29.0, < 2.0dev", |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 44 | "grpcgcp": "grpcio-gcp >= 0.2.2", |
| 45 | "grpcio-gcp": "grpcio-gcp >= 0.2.2", |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 46 | } |
Jon Wayne Parrott | 77fb0f2 | 2017-10-18 12:52:35 -0700 | [diff] [blame] | 47 | |
| 48 | |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 49 | # Setup boilerplate below this line. |
| 50 | |
| 51 | package_root = os.path.abspath(os.path.dirname(__file__)) |
| 52 | |
Christopher Wilcox | db8e636 | 2020-10-06 10:33:09 -0700 | [diff] [blame] | 53 | |
| 54 | version = {} |
| 55 | with open(os.path.join(package_root, "google/api_core/version.py")) as fp: |
| 56 | exec(fp.read(), version) |
Tres Seaver | fdbed0f | 2020-12-10 15:19:02 -0500 | [diff] [blame] | 57 | version = version["__version__"] |
Christopher Wilcox | db8e636 | 2020-10-06 10:33:09 -0700 | [diff] [blame] | 58 | |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 59 | readme_filename = os.path.join(package_root, "README.rst") |
| 60 | with io.open(readme_filename, encoding="utf-8") as readme_file: |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 61 | readme = readme_file.read() |
| 62 | |
| 63 | # Only include packages under the 'google' namespace. Do not include tests, |
| 64 | # benchmarks, etc. |
| 65 | packages = [ |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 66 | package for package in setuptools.find_packages() if package.startswith("google") |
| 67 | ] |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 68 | |
| 69 | # Determine which namespaces are needed. |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 70 | namespaces = ["google"] |
| 71 | if "google.cloud" in packages: |
| 72 | namespaces.append("google.cloud") |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 73 | |
| 74 | |
| 75 | setuptools.setup( |
| 76 | name=name, |
Dan Lee | f87bccb | 2021-04-26 13:10:31 -0400 | [diff] [blame] | 77 | version=version, |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 78 | description=description, |
| 79 | long_description=readme, |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 80 | author="Google LLC", |
| 81 | author_email="googleapis-packages@google.com", |
| 82 | license="Apache 2.0", |
Bu Sun Kim | e72202e | 2020-02-19 17:58:47 -0800 | [diff] [blame] | 83 | url="https://github.com/googleapis/python-api-core", |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 84 | classifiers=[ |
| 85 | release_status, |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 86 | "Intended Audience :: Developers", |
| 87 | "License :: OSI Approved :: Apache Software License", |
| 88 | "Programming Language :: Python", |
| 89 | "Programming Language :: Python :: 2", |
| 90 | "Programming Language :: Python :: 2.7", |
| 91 | "Programming Language :: Python :: 3", |
| 92 | "Programming Language :: Python :: 3.5", |
| 93 | "Programming Language :: Python :: 3.6", |
| 94 | "Programming Language :: Python :: 3.7", |
Tres Seaver | fdbed0f | 2020-12-10 15:19:02 -0500 | [diff] [blame] | 95 | "Programming Language :: Python :: 3.8", |
| 96 | "Programming Language :: Python :: 3.9", |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 97 | "Operating System :: OS Independent", |
| 98 | "Topic :: Internet", |
Jon Wayne Parrott | 77fb0f2 | 2017-10-18 12:52:35 -0700 | [diff] [blame] | 99 | ], |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame] | 100 | platforms="Posix; MacOS X; Windows", |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 101 | packages=packages, |
| 102 | namespace_packages=namespaces, |
| 103 | install_requires=dependencies, |
| 104 | extras_require=extras, |
Tres Seaver | 9ac3708 | 2020-12-14 12:44:10 -0500 | [diff] [blame] | 105 | python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*", |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 106 | include_package_data=True, |
| 107 | zip_safe=False, |
Jon Wayne Parrott | 77fb0f2 | 2017-10-18 12:52:35 -0700 | [diff] [blame] | 108 | ) |