mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
use a try / except to check if argparse is a needed dependency
This commit is contained in:
parent
352d2047b4
commit
1f32624e8b
1 changed files with 4 additions and 1 deletions
5
setup.py
5
setup.py
|
|
@ -6,7 +6,10 @@ import platform
|
|||
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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue