]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
setup: install setuptools < 45 for py2
authorKefu Chai <kchai@redhat.com>
Tue, 1 Sep 2020 11:25:08 +0000 (19:25 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 1 Sep 2020 12:11:00 +0000 (20:11 +0800)
see also https://github.com/pypa/virtualenv/issues/1493

Signed-off-by: Kefu Chai <kchai@redhat.com>
setup.py

index 2a167c1dc85d97f8f02bf3d87d6c5acd8bd67c75..d52094ca63625eddb2c425276f073c0affbccb3b 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -10,13 +10,13 @@ def read(fname):
     return f.read()
 
 
-install_requires = ['remoto>=1.1.4']
-pyversion = sys.version_info[:2]
-if pyversion < (2, 7) or (3, 0) <= pyversion <= (3, 1):
-    install_requires.append('argparse')
-if pyversion < (3, 0):
-    install_requires.append('configparser')
-
+install_requires = [
+    "remoto >= 1.1.4",
+    "argparse;python_version<'2.7'",
+    "argparse;'3.0'<=python_version<'3.2'",
+    "configparser;python_version<'3.0'",
+    "setuptools < 45.0.0;python_version<'3.0'",
+    "setuptools;python_version>='3.0'"]
 
 setup(
     name='ceph-deploy',
@@ -31,9 +31,7 @@ setup(
     keywords='ceph deploy',
     url="https://github.com/ceph/ceph-deploy",
 
-    install_requires=[
-        'setuptools',
-        ] + install_requires,
+    install_requires=install_requires,
 
     tests_require=[
         'pytest >=2.1.3',