blob: 344ba624a408c5b622e519157f2d531662a6b646 [file] [log] [blame]
Craig Citro751b7fb2014-09-23 11:20:38 -07001# Copyright 2014 Google Inc. All Rights Reserved.
Tom Miller7c95d812010-10-11 11:50:52 -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.
Joe Gregorio48d361f2010-08-18 13:19:21 -040014
Tom Miller7c95d812010-10-11 11:50:52 -070015"""Setup script for Google API Python client.
16
17Also installs included versions of third party libraries, if those libraries
18are not already installed.
19"""
Craig Citroa540cf72014-08-18 22:50:58 -070020from __future__ import print_function
21
22import sys
23
Bu Sun Kim8325d242020-12-09 12:04:05 -070024if sys.version_info < (3, 6):
25 print("google-api-python-client requires python3 version >= 3.6.", file=sys.stderr)
Bu Sun Kim66bb32c2019-10-30 10:11:58 -070026 sys.exit(1)
Craig Citroa540cf72014-08-18 22:50:58 -070027
Bu Sun Kimf706cfd2020-04-20 14:05:05 -070028import io
29import os
Anthonios Partheniou430449d2021-04-22 14:46:04 -040030from setuptools import setup
Joe Gregorio01b92702011-03-23 21:44:42 -040031
Bu Sun Kim66bb32c2019-10-30 10:11:58 -070032packages = ["apiclient", "googleapiclient", "googleapiclient/discovery_cache"]
Joe Gregorio5cdaa512011-03-28 16:41:55 -040033
Joe Gregoriod667c9d2011-10-17 13:25:24 -040034install_requires = [
Thomas Chopiteac00f70d2020-09-29 02:14:53 +020035 "httplib2>=0.15.0,<1dev",
Bu Sun Kim96d2bb02021-07-20 04:14:29 -060036 # 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",
Bu Sun Kima9583f72021-03-15 09:12:02 -060040 "google-auth-httplib2>=0.1.0",
Bu Sun Kim96d2bb02021-07-20 04:14:29 -060041 # 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",
Anthonios Partheniou1c4cfdb2021-12-13 11:36:06 -050045 "uritemplate>=3.0.1,<5",
John Asmuth864311d2014-04-24 15:46:08 -040046]
Joe Gregorio6429bf62011-03-01 22:53:21 -080047
Bu Sun Kimf706cfd2020-04-20 14:05:05 -070048package_root = os.path.abspath(os.path.dirname(__file__))
Tom Miller7c95d812010-10-11 11:50:52 -070049
Bu Sun Kimf706cfd2020-04-20 14:05:05 -070050readme_filename = os.path.join(package_root, "README.md")
51with io.open(readme_filename, encoding="utf-8") as readme_file:
52 readme = readme_file.read()
Bu Sun Kim66bb32c2019-10-30 10:11:58 -070053
joinsion83db1d72021-12-13 23:43:32 +080054package_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__"]
Joe Gregorio696583c2012-03-21 15:20:51 -040060
Anthonios Partheniou430449d2021-04-22 14:46:04 -040061setup(
John Asmuth864311d2014-04-24 15:46:08 -040062 name="google-api-python-client",
Anthonios Partheniou430449d2021-04-22 14:46:04 -040063 version=version,
John Asmuth864311d2014-04-24 15:46:08 -040064 description="Google API Client Library for Python",
Bu Sun Kimf706cfd2020-04-20 14:05:05 -070065 long_description=readme,
66 long_description_content_type='text/markdown',
67 author="Google LLC",
68 author_email="googleapis-packages@google.com",
Marie J.I48f503f2020-05-15 13:32:11 -040069 url="https://github.com/googleapis/google-api-python-client/",
John Asmuth864311d2014-04-24 15:46:08 -040070 install_requires=install_requires,
Bu Sun Kim8325d242020-12-09 12:04:05 -070071 python_requires=">=3.6",
John Asmuth864311d2014-04-24 15:46:08 -040072 packages=packages,
Anthonios Partheniouad618d02021-03-04 12:02:12 -050073 package_data={"googleapiclient": ["discovery_cache/documents/*.json"]},
John Asmuth864311d2014-04-24 15:46:08 -040074 license="Apache 2.0",
75 keywords="google api client",
76 classifiers=[
Bu Sun Kim66bb32c2019-10-30 10:11:58 -070077 "Programming Language :: Python :: 3",
Bu Sun Kim66bb32c2019-10-30 10:11:58 -070078 "Programming Language :: Python :: 3.6",
79 "Programming Language :: Python :: 3.7",
Bu Sun Kim8325d242020-12-09 12:04:05 -070080 "Programming Language :: Python :: 3.8",
81 "Programming Language :: Python :: 3.9",
Anthonios Parthenioubcc507f2021-10-12 12:49:54 -040082 "Programming Language :: Python :: 3.10",
Bu Sun Kim66bb32c2019-10-30 10:11:58 -070083 "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",
John Asmuth864311d2014-04-24 15:46:08 -040088 ],
John Asmuth864311d2014-04-24 15:46:08 -040089)