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" |
| 25 | version = "1.5.2" |
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 = [ |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame^] | 32 | "googleapis-common-protos >= 1.5.3, != 1.5.4, < 2.0dev", |
| 33 | "protobuf >= 3.4.0", |
| 34 | "google-auth >= 0.4.0, < 2.0dev", |
| 35 | "requests >= 2.18.0, < 3.0.0dev", |
| 36 | "setuptools >= 34.0.0", |
| 37 | "six >= 1.10.0", |
| 38 | "pytz", |
| 39 | 'futures >= 3.2.0; python_version < "3.2"', |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 40 | ] |
| 41 | extras = { |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame^] | 42 | "grpc": "grpcio >= 1.8.2", |
| 43 | "grpcgcp": "grpcio-gcp >= 0.2.2", |
| 44 | "grpcio-gcp": "grpcio-gcp >= 0.2.2", |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 45 | } |
Jon Wayne Parrott | 77fb0f2 | 2017-10-18 12:52:35 -0700 | [diff] [blame] | 46 | |
| 47 | |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 48 | # Setup boilerplate below this line. |
| 49 | |
| 50 | package_root = os.path.abspath(os.path.dirname(__file__)) |
| 51 | |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame^] | 52 | readme_filename = os.path.join(package_root, "README.rst") |
| 53 | with io.open(readme_filename, encoding="utf-8") as readme_file: |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 54 | readme = readme_file.read() |
| 55 | |
| 56 | # Only include packages under the 'google' namespace. Do not include tests, |
| 57 | # benchmarks, etc. |
| 58 | packages = [ |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame^] | 59 | package for package in setuptools.find_packages() if package.startswith("google") |
| 60 | ] |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 61 | |
| 62 | # Determine which namespaces are needed. |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame^] | 63 | namespaces = ["google"] |
| 64 | if "google.cloud" in packages: |
| 65 | namespaces.append("google.cloud") |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 66 | |
| 67 | |
| 68 | setuptools.setup( |
| 69 | name=name, |
| 70 | version=version, |
| 71 | description=description, |
| 72 | long_description=readme, |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame^] | 73 | author="Google LLC", |
| 74 | author_email="googleapis-packages@google.com", |
| 75 | license="Apache 2.0", |
| 76 | url="https://github.com/GoogleCloudPlatform/google-cloud-python", |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 77 | classifiers=[ |
| 78 | release_status, |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame^] | 79 | "Intended Audience :: Developers", |
| 80 | "License :: OSI Approved :: Apache Software License", |
| 81 | "Programming Language :: Python", |
| 82 | "Programming Language :: Python :: 2", |
| 83 | "Programming Language :: Python :: 2.7", |
| 84 | "Programming Language :: Python :: 3", |
| 85 | "Programming Language :: Python :: 3.5", |
| 86 | "Programming Language :: Python :: 3.6", |
| 87 | "Programming Language :: Python :: 3.7", |
| 88 | "Operating System :: OS Independent", |
| 89 | "Topic :: Internet", |
Jon Wayne Parrott | 77fb0f2 | 2017-10-18 12:52:35 -0700 | [diff] [blame] | 90 | ], |
Christopher Wilcox | 6f4070d | 2018-11-29 11:02:52 -0800 | [diff] [blame^] | 91 | platforms="Posix; MacOS X; Windows", |
Jon Wayne Parrott | c0f12e2 | 2018-02-22 10:28:50 -0800 | [diff] [blame] | 92 | packages=packages, |
| 93 | namespace_packages=namespaces, |
| 94 | install_requires=dependencies, |
| 95 | extras_require=extras, |
| 96 | include_package_data=True, |
| 97 | zip_safe=False, |
Jon Wayne Parrott | 77fb0f2 | 2017-10-18 12:52:35 -0700 | [diff] [blame] | 98 | ) |