fix: add back python 2.7 for gcloud usage only (#892)
* fix: add back python 2.7 for gcloud
* fix: fix setup and tests
* fix: add enum34 for python 2.7
* fix: add app engine app and fix noxfile
* fix: move test_app_engine.py
* fix: fix downscoped
* fix: fix downscoped
* fix: remove py2 from classifiers
diff --git a/setup.py b/setup.py
index 343e660..301e996 100644
--- a/setup.py
+++ b/setup.py
@@ -20,16 +20,25 @@
DEPENDENCIES = (
- "cachetools >= 2.0.0, < 5.0",
- "pyasn1-modules >= 0.2.1",
- "rsa >= 3.1.4, < 5",
- "setuptools >= 40.3.0",
+ "cachetools>=2.0.0,<5.0",
+ "pyasn1-modules>=0.2.1",
+ # rsa==4.5 is the last version to support 2.7
+ # https://github.com/sybrenstuvel/python-rsa/issues/152#issuecomment-643470233
+ 'rsa<4.6; python_version < "3.6"',
+ 'rsa>=3.1.4,<5; python_version >= "3.6"',
+ # install enum34 to support 2.7. enum34 only works up to python version 3.3.
+ 'enum34>=1.1.10; python_version < "3.4"',
+ "setuptools>=40.3.0",
+ "six>=1.9.0",
)
extras = {
- "aiohttp": ["aiohttp >= 3.6.2, < 4.0.0dev", "requests >= 2.20.0, < 3.0.0dev"],
- "pyopenssl": "pyopenssl >= 20.0.0",
- "reauth": "pyu2f >= 0.1.5",
+ "aiohttp": [
+ "aiohttp >= 3.6.2, < 4.0.0dev; python_version>='3.6'",
+ "requests >= 2.20.0, < 3.0.0dev",
+ ],
+ "pyopenssl": "pyopenssl>=20.0.0",
+ "reauth": "pyu2f>=0.1.5",
}
with io.open("README.rst", "r") as fh:
@@ -54,7 +63,7 @@
namespace_packages=("google",),
install_requires=DEPENDENCIES,
extras_require=extras,
- python_requires=">= 3.6",
+ python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*",
license="Apache 2.0",
keywords="google auth oauth client",
classifiers=[