From: Kefu Chai Date: Tue, 1 Sep 2020 11:25:08 +0000 (+0800) Subject: setup: install setuptools < 45 for py2 X-Git-Tag: v2.1.0~9^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=67814090bf0f47294d21a09fa809649f50a65058;p=ceph-deploy.git setup: install setuptools < 45 for py2 see also https://github.com/pypa/virtualenv/issues/1493 Signed-off-by: Kefu Chai --- diff --git a/setup.py b/setup.py index 2a167c1..d52094c 100644 --- 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',