Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8975f87

Browse files
author
Max Persson
committed
Add argparse as install requirement only when Python < 2.7
1 parent 1573539 commit 8975f87

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

setup.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,32 @@
2323
# SOFTWARE.
2424

2525
execfile('zerorpc/version.py')
26+
import sys
27+
2628

2729
try:
2830
from setuptools import setup
2931
except ImportError:
3032
from distutils.core import setup
3133

3234

35+
requirements = [
36+
'gevent',
37+
'msgpack-python',
38+
'pyzmq>=2.2.0.1'
39+
]
40+
if sys.version_info < (2, 7):
41+
requirements.append('argparse')
42+
43+
3344
setup(
3445
name='zerorpc',
3546
version=__version__,
3647
description='zerorpc is a flexible RPC based on zeromq.',
3748
author=__author__,
3849
url='https://github.com/dotcloud/zerorpc-python',
3950
packages=['zerorpc'],
40-
install_requires=[
41-
'argparse',
42-
'gevent',
43-
'msgpack-python',
44-
'pyzmq>=2.2.0.1',
45-
],
51+
install_requires=requirements,
4652
tests_require=['nose'],
4753
test_suite='nose.collector',
4854
zip_safe=False,

0 commit comments

Comments
 (0)