relax version pins in setup.py for non-Py2 users

This commit is contained in:
Michael Penkov 2020-04-29 12:38:33 +09:00
parent 56887073aa
commit 4a7b5adbae

View File

@ -8,6 +8,8 @@ import setuptools
from setuptools import setup, find_packages from setuptools import setup, find_packages
import sys import sys
PY2 = sys.version_info[0] == 2
# Borrowed from pip at https://github.com/pypa/pip/blob/62c27dee45625e1b63d1e023b0656310f276e050/setup.py#L11-L15 # Borrowed from pip at https://github.com/pypa/pip/blob/62c27dee45625e1b63d1e023b0656310f276e050/setup.py#L11-L15
here = os.path.abspath(os.path.dirname(__file__)) here = os.path.abspath(os.path.dirname(__file__))
@ -28,8 +30,6 @@ def get_version():
install_requires = [ install_requires = [
"setuptools==44.0.0",
"Jinja2<3.0.0,>=2.10.1",
"boto>=2.36.0", "boto>=2.36.0",
"boto3>=1.9.201", "boto3>=1.9.201",
"botocore>=1.12.201", "botocore>=1.12.201",
@ -42,17 +42,39 @@ install_requires = [
"pytz", "pytz",
"python-dateutil<3.0.0,>=2.1", "python-dateutil<3.0.0,>=2.1",
"python-jose<4.0.0", "python-jose<4.0.0",
"mock<=3.0.5",
"docker>=2.5.1", "docker>=2.5.1",
"jsondiff>=1.1.2", "jsondiff>=1.1.2",
"aws-xray-sdk!=0.96,>=0.93", "aws-xray-sdk!=0.96,>=0.93",
"responses>=0.9.0", "responses>=0.9.0",
"idna<3,>=2.5", "idna<3,>=2.5",
"cfn-lint>=0.4.0", "cfn-lint>=0.4.0",
]
#
# Avoid pins where they are not necessary. These pins were introduced by the
# following commit for Py2 compatibility. They are not required for non-Py2
# users.
#
# https://github.com/mpenkov/moto/commit/00134d2df37bb4dcd5f447ef951d383bfec0903c
#
if PY2:
install_requires += [
"Jinja2<3.0.0,>=2.10.1",
"mock<=3.0.5",
"more-itertools==5.0.0",
"setuptools==44.0.0",
"sshpubkeys>=3.1.0,<4.0", "sshpubkeys>=3.1.0,<4.0",
"zipp==0.6.0", "zipp==0.6.0",
"more-itertools==5.0.0" ]
] else:
install_requires += [
"Jinja2>=2.10.1",
"mock",
"more-itertools",
"setuptools",
"sshpubkeys>=3.1.0",
"zipp",
]
extras_require = { extras_require = {
'server': ['flask'], 'server': ['flask'],