Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only mark argparse as required for versions of Python without argparse

Conditionally include argparse as a requirement only for versions of
Python that do not have argparse already bundled.
  • Loading branch information...
commit 8d87c035dfad64de9898da447daaee319e34b423 1 parent db23ba5
Paul Traylor kfdm authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 setup.py
9 setup.py
View
@@ -3,6 +3,13 @@
import glob
from setuptools import setup, find_packages
+install_requires = ['distribute']
+
+try:
+ import argparse
+except ImportError:
+ install_requires.append('argparse')
+
setup(
name='argcomplete',
version='0.3.9',
@@ -12,7 +19,7 @@
author_email='kislyuk@gmail.com',
description='Bash tab completion for argparse',
long_description=open('README.rst').read(),
- install_requires=['distribute', 'argparse'],
+ install_requires=install_requires,
packages = find_packages(),
scripts = glob.glob('scripts/*'),
package_data={'argcomplete': ['bash_completion.d/python-argcomplete.sh']},
Please sign in to comment.
Something went wrong with that request. Please try again.