Commit 3903db81 authored by Łukasz Nowak's avatar Łukasz Nowak

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 7fcf16a8
...@@ -10,6 +10,13 @@ long_description = open("README.txt").read() + "\n" + \ ...@@ -10,6 +10,13 @@ long_description = open("README.txt").read() + "\n" + \
for f in sorted(glob.glob(os.path.join('slapos', 'README.*.txt'))): for f in sorted(glob.glob(os.path.join('slapos', 'README.*.txt'))):
long_description += '\n' + open(f).read() + '\n' 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, setup(name=name,
version=version, version=version,
description="SlapOS toolbox.", description="SlapOS toolbox.",
...@@ -34,7 +41,7 @@ setup(name=name, ...@@ -34,7 +41,7 @@ setup(name=name,
'slapos.core', # as it provides library for slap 'slapos.core', # as it provides library for slap
'xml_marshaller', # needed to dump information 'xml_marshaller', # needed to dump information
'GitPython', #needed for git manipulation into slaprunner 'GitPython', #needed for git manipulation into slaprunner
], ] + additional_install_requires,
extras_require = { extras_require = {
'lampconfigure': ["mysql-python"], #needed for MySQL Database access 'lampconfigure': ["mysql-python"], #needed for MySQL Database access
'zodbpack': ['ZODB3'], # needed to play with ZODB '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