Skip to content

Commit

Permalink
chore(revert): revert preventing normalization (#740)
Browse files Browse the repository at this point in the history
reverts previous commit for preventing normalization of versioning
  • Loading branch information
dandhlee committed Apr 27, 2021
1 parent 99c6b01 commit 04c870a
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions setup.py
Expand Up @@ -15,24 +15,9 @@
import io
import os

import setuptools
from setuptools import find_packages
from setuptools import setup

# Disable version normalization performed by setuptools.setup()
# Adding this in even though it works for Python3.x, but does not
# work for Python 2.7
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

DEPENDENCIES = (
"cachetools>=2.0.0,<5.0",
Expand Down Expand Up @@ -61,15 +46,15 @@
exec(fp.read(), version)
version = version["__version__"]

setuptools.setup(
setup(
name="google-auth",
version=sic(version),
version=version,
author="Google Cloud Platform",
author_email="googleapis-packages@google.com",
description="Google Authentication Library",
long_description=long_description,
url="https://github.com/googleapis/google-auth-library-python",
packages=setuptools.find_packages(exclude=("tests*", "system_tests*")),
packages=find_packages(exclude=("tests*", "system_tests*")),
namespace_packages=("google",),
install_requires=DEPENDENCIES,
extras_require=extras,
Expand Down

0 comments on commit 04c870a

Please sign in to comment.