# Copyright 2014 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import io

import setuptools

# Disable version normalization performed by setuptools.setup()
try:
    # Try the approach of using sic(), added in setuptools 46.1.0
    from setuptools import sic
except ImportError:
    # Try the approach of replacing packaging.version.Version
    sic = lambda v: v
    try:
        # setuptools >=39.0.0 uses packaging from setuptools.extern
        from setuptools.extern import packaging
    except ImportError:
        # setuptools <39.0.0 uses packaging from pkg_resources.extern
        from pkg_resources.extern import packaging
    packaging.version.Version = packaging.version.LegacyVersion

version = "0.1.0"

DEPENDENCIES = ["google-auth", "httplib2 >= 0.15.0", "six"]


with io.open("README.rst", "r") as fh:
    long_description = fh.read()


setuptools.setup(
    name="google-auth-httplib2",
    version=sic(version),
    author="Google Cloud Platform",
    author_email="googleapis-packages@google.com",
    description="Google Authentication Library: httplib2 transport",
    long_description=long_description,
    url="https://github.com/GoogleCloudPlatform/google-auth-library-python-httplib2",
    py_modules=["google_auth_httplib2"],
    install_requires=DEPENDENCIES,
    license="Apache 2.0",
    keywords="google auth oauth client",
    classifiers=[
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: POSIX",
        "Operating System :: Microsoft :: Windows",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: OS Independent",
        "Topic :: Internet :: WWW/HTTP",
    ],
)

@@ -585,630 +585,36 @@
 io%0A%0A
-import setuptools%0A%0A# Disable version normalization performed by setuptools.setup()%0Atry:%0A    # Try the approach of using sic(), added in setuptools 46.1.0%0A    from setuptools import sic%0Aexcept ImportError:%0A    # Try the approach of replacing packaging.version.Version%0A    sic = lambda v: v%0A    try:%0A        # setuptools %3E=39.0.0 uses packaging from setuptools.extern%0A        from setuptools.extern import packaging%0A    except ImportError:%0A        # setuptools %3C39.0.0 uses packaging from pkg_resources.extern%0A        from pkg_resources.extern import packaging%0A    packaging.version.Version = packaging.version.LegacyVersion
+from setuptools import setup
 %0A%0Ave
@@ -770,26 +770,15 @@
 )%0A%0A%0A
-setuptools.
 setup(%0A
+
     
@@ -822,20 +822,15 @@
 ion=
-sic(
 version
-)
 ,%0A  

revert preventing normalization (#27)