1# Copyright 2014 Google Inc.
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
18from setuptools import find_packages
19from setuptools import setup
20
21
22DEPENDENCIES = (
23    "cachetools>=2.0.0,<5.0",
24    "pyasn1-modules>=0.2.1",
25    # rsa==4.5 is the last version to support 2.7
26    # https://github.com/sybrenstuvel/python-rsa/issues/152#issuecomment-643470233
27    'rsa<4.6; python_version < "3.6"',
28    'rsa>=3.1.4,<5; python_version >= "3.6"',
29    # install enum34 to support 2.7. enum34 only works up to python version 3.3.
30    'enum34>=1.1.10; python_version < "3.4"',
31    "setuptools>=40.3.0",
32    "six>=1.9.0",
33)
34
35extras = {
36    "aiohttp": [
37        "aiohttp >= 3.6.2, < 4.0.0dev; python_version>='3.6'",
38        "requests >= 2.20.0, < 3.0.0dev",
39    ],
40    "pyopenssl": "pyopenssl>=20.0.0",
41    "reauth": "pyu2f>=0.1.5",
42}
43
44with io.open("README.rst", "r") as fh:
45    long_description = fh.read()
46
47package_root = os.path.abspath(os.path.dirname(__file__))
48
49version = {}
50with open(os.path.join(package_root, "google/auth/version.py")) as fp:
51    exec(fp.read(), version)
52version = version["__version__"]
53
54setup(
55    name="google-auth",
56    version=version,
57    author="Google Cloud Platform",
58    author_email="googleapis-packages@google.com",
59    description="Google Authentication Library",
60    long_description=long_description,
61    url="https://github.com/googleapis/google-auth-library-python",
62    packages=find_packages(exclude=("tests*", "system_tests*")),
63    namespace_packages=("google",),
64    install_requires=DEPENDENCIES,
65    extras_require=extras,
66    python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*",
67    license="Apache 2.0",
68    keywords="google auth oauth client",
69    classifiers=[
70        "Programming Language :: Python :: 3",
71        "Programming Language :: Python :: 3.6",
72        "Programming Language :: Python :: 3.7",
73        "Programming Language :: Python :: 3.8",
74        "Programming Language :: Python :: 3.9",
75        "Programming Language :: Python :: 3.10",
76        "Development Status :: 5 - Production/Stable",
77        "Intended Audience :: Developers",
78        "License :: OSI Approved :: Apache Software License",
79        "Operating System :: POSIX",
80        "Operating System :: Microsoft :: Windows",
81        "Operating System :: MacOS :: MacOS X",
82        "Operating System :: OS Independent",
83        "Topic :: Internet :: WWW/HTTP",
84    ],
85)
86