Skip to content

Commit 6781409

Browse files
committed
setup: install setuptools < 45 for py2
see also pypa/virtualenv#1493 Signed-off-by: Kefu Chai <[email protected]>
1 parent 447b7d1 commit 6781409

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

setup.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ def read(fname):
1010
return f.read()
1111

1212

13-
install_requires = ['remoto>=1.1.4']
14-
pyversion = sys.version_info[:2]
15-
if pyversion < (2, 7) or (3, 0) <= pyversion <= (3, 1):
16-
install_requires.append('argparse')
17-
if pyversion < (3, 0):
18-
install_requires.append('configparser')
19-
13+
install_requires = [
14+
"remoto >= 1.1.4",
15+
"argparse;python_version<'2.7'",
16+
"argparse;'3.0'<=python_version<'3.2'",
17+
"configparser;python_version<'3.0'",
18+
"setuptools < 45.0.0;python_version<'3.0'",
19+
"setuptools;python_version>='3.0'"]
2020

2121
setup(
2222
name='ceph-deploy',
@@ -31,9 +31,7 @@ def read(fname):
3131
keywords='ceph deploy',
3232
url="https://github.com/ceph/ceph-deploy",
3333

34-
install_requires=[
35-
'setuptools',
36-
] + install_requires,
34+
install_requires=install_requires,
3735

3836
tests_require=[
3937
'pytest >=2.1.3',

0 commit comments

Comments
 (0)