Permalink
Browse files

use a try / except to check if argparse is a needed dependency

  • Loading branch information...
1 parent 352d204 commit 1f32624e8bb33926d7d836ddf3b71772a2efb88e @AndreaCrotti AndreaCrotti committed Mar 7, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 setup.py
View
5 setup.py
@@ -6,7 +6,10 @@
VERSION = "3.0" # find a better way to do so.
requires = ['feedgenerator', 'jinja2', 'pygments', 'docutils', 'pytz']
-if sys.version_info < (2,7):
+
+try:
+ import argparse
+except ImportError:
requires.append('argparse')
scripts = ['bin/pelican', 'tools/pelican-themes', 'tools/pelican-import', 'tools/pelican-quickstart']

0 comments on commit 1f32624

Please sign in to comment.