From 67814090bf0f47294d21a09fa809649f50a65058 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 1 Sep 2020 19:25:08 +0800 Subject: [PATCH] setup: install setuptools < 45 for py2 see also https://github.com/pypa/virtualenv/issues/1493 Signed-off-by: Kefu Chai --- setup.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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', -- 2.47.3