diff --git a/setup.py b/setup.py index 74240dd..010fa71 100755 --- a/setup.py +++ b/setup.py @@ -1,10 +1,16 @@ #!/usr/bin/env python from distutils.core import setup +from sys import version_info with open('README.rst') as file: long_description = file.read() +install_requires = ['requests'] + +if not (version_info.major == 2 and version_info.minor >=7): + install_requires.append('argparse') + setup(name='ESClient', version="0.5.6", description='A lightweight Python client for ElasticSearch, including a dump and import tool for indexes', @@ -14,7 +20,7 @@ py_modules=['esclient'], license='New BSD license', keywords = ["elasticsearch"], - install_requires = ['requests'], + install_requires = install_requires, scripts = ['bin/esdump', 'bin/esimport'], classifiers=[ 'Development Status :: 4 - Beta', @@ -26,4 +32,4 @@ 'Topic :: Internet :: WWW/HTTP :: Indexing/Search' ], long_description = long_description - ) + ) \ No newline at end of file