• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2014 Google Inc. All Rights Reserved.
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
15"""Setup script for Google API Python client.
16
17Also installs included versions of third party libraries, if those libraries
18are not already installed.
19"""
20from __future__ import print_function
21
22import sys
23
24if sys.version_info < (3, 6):
25    print("google-api-python-client requires python3 version >= 3.6.", file=sys.stderr)
26    sys.exit(1)
27
28import io
29import os
30from setuptools import setup
31
32packages = ["apiclient", "googleapiclient", "googleapiclient/discovery_cache"]
33
34install_requires = [
35    "httplib2>=0.15.0,<1dev",
36    # NOTE: Maintainers, please do not require google-auth>=2.x.x
37    # Until this issue is closed
38    # https://github.com/googleapis/google-cloud-python/issues/10566
39    "google-auth>=1.16.0,<3.0.0dev",
40    "google-auth-httplib2>=0.1.0",
41    # NOTE: Maintainers, please do not require google-api-core>=2.x.x
42    # Until this issue is closed
43    # https://github.com/googleapis/google-cloud-python/issues/10566
44    "google-api-core>=1.21.0,<3.0.0dev",
45    "uritemplate>=3.0.1,<5",
46]
47
48package_root = os.path.abspath(os.path.dirname(__file__))
49
50readme_filename = os.path.join(package_root, "README.md")
51with io.open(readme_filename, encoding="utf-8") as readme_file:
52    readme = readme_file.read()
53
54package_root = os.path.abspath(os.path.dirname(__file__))
55
56version = {}
57with open(os.path.join(package_root, "googleapiclient/version.py")) as fp:
58    exec(fp.read(), version)
59version = version["__version__"]
60
61setup(
62    name="google-api-python-client",
63    version=version,
64    description="Google API Client Library for Python",
65    long_description=readme,
66    long_description_content_type='text/markdown',
67    author="Google LLC",
68    author_email="googleapis-packages@google.com",
69    url="https://github.com/googleapis/google-api-python-client/",
70    install_requires=install_requires,
71    python_requires=">=3.6",
72    packages=packages,
73    package_data={"googleapiclient": ["discovery_cache/documents/*.json"]},
74    license="Apache 2.0",
75    keywords="google api client",
76    classifiers=[
77        "Programming Language :: Python :: 3",
78        "Programming Language :: Python :: 3.6",
79        "Programming Language :: Python :: 3.7",
80        "Programming Language :: Python :: 3.8",
81        "Programming Language :: Python :: 3.9",
82        "Programming Language :: Python :: 3.10",
83        "Development Status :: 5 - Production/Stable",
84        "Intended Audience :: Developers",
85        "License :: OSI Approved :: Apache Software License",
86        "Operating System :: OS Independent",
87        "Topic :: Internet :: WWW/HTTP",
88    ],
89)
90