blob: d150bc0131b597e67dab021ea28df30119448669 [file] [log] [blame]
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -08001# Copyright 2018 Google LLC
Jon Wayne Parrott77fb0f22017-10-18 12:52:35 -07002#
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 Parrottc0f12e22018-02-22 10:28:50 -080015import io
Jon Wayne Parrott77fb0f22017-10-18 12:52:35 -070016import os
17
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080018import setuptools
Jon Wayne Parrott77fb0f22017-10-18 12:52:35 -070019
20
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080021# Package metadata.
Jon Wayne Parrott77fb0f22017-10-18 12:52:35 -070022
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080023name = "google-api-core"
24description = "Google API client core library"
Christopher Wilcoxd480d972020-10-05 12:06:00 -070025
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080026# Should be one of:
27# 'Development Status :: 3 - Alpha'
28# 'Development Status :: 4 - Beta'
Jon Wayne Parrotta7309d72018-03-15 08:52:22 -070029# 'Development Status :: 5 - Production/Stable'
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080030release_status = "Development Status :: 5 - Production/Stable"
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080031dependencies = [
Tres Seaver13eea092019-07-17 14:46:56 -040032 "googleapis-common-protos >= 1.6.0, < 2.0dev",
Bu Sun Kim1ba60952020-06-16 09:40:08 -070033 "protobuf >= 3.12.0",
Tres Seavera30f0042021-08-03 13:59:25 -040034 "google-auth >= 1.25.0, < 3.0dev",
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080035 "requests >= 2.18.0, < 3.0.0dev",
Bu Sun Kimc5fee892021-01-13 14:46:03 -070036 "setuptools >= 40.3.0",
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080037]
38extras = {
Lidi Zhengbdbf8892021-08-13 09:05:01 -070039 "grpc": "grpcio >= 1.33.2, < 2.0dev",
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080040 "grpcgcp": "grpcio-gcp >= 0.2.2",
41 "grpcio-gcp": "grpcio-gcp >= 0.2.2",
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080042}
Jon Wayne Parrott77fb0f22017-10-18 12:52:35 -070043
44
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080045# Setup boilerplate below this line.
46
47package_root = os.path.abspath(os.path.dirname(__file__))
48
Christopher Wilcoxdb8e6362020-10-06 10:33:09 -070049
50version = {}
51with open(os.path.join(package_root, "google/api_core/version.py")) as fp:
52 exec(fp.read(), version)
Tres Seaverfdbed0f2020-12-10 15:19:02 -050053version = version["__version__"]
Christopher Wilcoxdb8e6362020-10-06 10:33:09 -070054
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080055readme_filename = os.path.join(package_root, "README.rst")
56with io.open(readme_filename, encoding="utf-8") as readme_file:
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080057 readme = readme_file.read()
58
59# Only include packages under the 'google' namespace. Do not include tests,
60# benchmarks, etc.
61packages = [
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080062 package for package in setuptools.find_packages() if package.startswith("google")
63]
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080064
65# Determine which namespaces are needed.
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080066namespaces = ["google"]
67if "google.cloud" in packages:
68 namespaces.append("google.cloud")
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080069
70
71setuptools.setup(
72 name=name,
Dan Leef87bccb2021-04-26 13:10:31 -040073 version=version,
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080074 description=description,
75 long_description=readme,
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080076 author="Google LLC",
77 author_email="googleapis-packages@google.com",
78 license="Apache 2.0",
Bu Sun Kime72202e2020-02-19 17:58:47 -080079 url="https://github.com/googleapis/python-api-core",
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080080 classifiers=[
81 release_status,
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080082 "Intended Audience :: Developers",
83 "License :: OSI Approved :: Apache Software License",
84 "Programming Language :: Python",
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080085 "Programming Language :: Python :: 3",
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080086 "Programming Language :: Python :: 3.6",
87 "Programming Language :: Python :: 3.7",
Tres Seaverfdbed0f2020-12-10 15:19:02 -050088 "Programming Language :: Python :: 3.8",
89 "Programming Language :: Python :: 3.9",
Tres Seavera422a5d2021-10-05 16:54:45 -040090 "Programming Language :: Python :: 3.10",
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080091 "Operating System :: OS Independent",
92 "Topic :: Internet",
Jon Wayne Parrott77fb0f22017-10-18 12:52:35 -070093 ],
Christopher Wilcox6f4070d2018-11-29 11:02:52 -080094 platforms="Posix; MacOS X; Windows",
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -080095 packages=packages,
96 namespace_packages=namespaces,
97 install_requires=dependencies,
98 extras_require=extras,
Tres Seavera30f0042021-08-03 13:59:25 -040099 python_requires=">=3.6",
Jon Wayne Parrottc0f12e22018-02-22 10:28:50 -0800100 include_package_data=True,
101 zip_safe=False,
Jon Wayne Parrott77fb0f22017-10-18 12:52:35 -0700102)