mirror of
https://github.com/httpie/cli.git
synced 2025-08-17 22:10:58 +02:00
Try to import argparse before adding it to reqs.
This commit is contained in:
7
setup.py
7
setup.py
@@ -14,9 +14,12 @@ requirements = [
|
||||
'requests>=1.2.3',
|
||||
'Pygments>=1.5'
|
||||
]
|
||||
if sys.version_info[:2] in ((2, 6), (3, 1)):
|
||||
# argparse has been added in Python 3.2 / 2.7
|
||||
try:
|
||||
#noinspection PyUnresolvedReferences
|
||||
import argparse
|
||||
except ImportError:
|
||||
requirements.append('argparse>=1.2.1')
|
||||
|
||||
if 'win32' in str(sys.platform).lower():
|
||||
# Terminal colors for Windows
|
||||
requirements.append('colorama>=0.2.4')
|
||||
|
Reference in New Issue
Block a user