1# Copyright 2018 Google LLC
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
15import io
16import os
17
18import setuptools
19
20
21# Package metadata.
22
23name = "google-cloud-core"
24description = "Google Cloud API client core library"
25# Should be one of:
26# 'Development Status :: 3 - Alpha'
27# 'Development Status :: 4 - Beta'
28# 'Development Status :: 5 - Production/Stable'
29release_status = "Development Status :: 5 - Production/Stable"
30dependencies = [
31    "google-api-core >= 1.21.0, < 3.0.0dev",
32    "google-auth >= 1.24.0, < 3.0dev",
33]
34extras = {"grpc": "grpcio >= 1.8.2, < 2.0dev"}
35
36
37# Setup boilerplate below this line.
38
39package_root = os.path.abspath(os.path.dirname(__file__))
40
41version = {}
42with open(os.path.join(package_root, "google/cloud/version.py")) as fp:
43    exec(fp.read(), version)
44version = version["__version__"]
45
46readme_filename = os.path.join(package_root, "README.rst")
47with io.open(readme_filename, encoding="utf-8") as readme_file:
48    readme = readme_file.read()
49
50# Only include packages under the 'google' namespace. Do not include tests,
51# benchmarks, etc.
52packages = [
53    package for package in setuptools.find_packages() if package.startswith("google")
54]
55
56# Determine which namespaces are needed.
57namespaces = ["google"]
58if "google.cloud" in packages:
59    namespaces.append("google.cloud")
60
61
62setuptools.setup(
63    name=name,
64    version=version,
65    description=description,
66    long_description=readme,
67    author="Google LLC",
68    author_email="googleapis-packages@google.com",
69    license="Apache 2.0",
70    url="https://github.com/googleapis/python-cloud-core",
71    classifiers=[
72        release_status,
73        "Intended Audience :: Developers",
74        "License :: OSI Approved :: Apache Software License",
75        "Programming Language :: Python",
76        "Programming Language :: Python :: 3",
77        "Programming Language :: Python :: 3.6",
78        "Programming Language :: Python :: 3.7",
79        "Programming Language :: Python :: 3.8",
80        "Programming Language :: Python :: 3.9",
81        "Programming Language :: Python :: 3.10",
82        "Operating System :: OS Independent",
83        "Topic :: Internet",
84    ],
85    platforms="Posix; MacOS X; Windows",
86    packages=packages,
87    namespace_packages=namespaces,
88    install_requires=dependencies,
89    extras_require=extras,
90    python_requires=">=3.6",
91    include_package_data=True,
92    zip_safe=False,
93)
94