Commit 775b9704 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Alain Takoudjou

Automatically install argparse if missing.

argparse is available from python2.7, but a lot of python2.7 compilations does
not provide it.

As users expect package to work by default, in case if python used to install
package does not contain argparse, add it to install_requires without requiring
any intervention, because default invocation shall work.
parent 1655c446
......@@ -10,6 +10,13 @@ long_description = open("README.txt").read() + "\n" + \
for f in sorted(glob.glob(os.path.join('slapos', 'README.*.txt'))):
long_description += '\n' + open(f).read() + '\n'
# Provide a way to install additional requirements
additional_install_requires = []
try:
import argparse
except ImportError:
additional_install_requires.append('argparse')
setup(name=name,
version=version,
description="SlapOS toolbox.",
......@@ -34,7 +41,7 @@ setup(name=name,
'slapos.core', # as it provides library for slap
'xml_marshaller', # needed to dump information
'GitPython', #needed for git manipulation into slaprunner
],
] + additional_install_requires,
extras_require = {
'lampconfigure': ["mysql-python"], #needed for MySQL Database access
'zodbpack': ['ZODB3'], # needed to play with ZODB
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment