Setup.py fix

- handle missing "optional" key in package definition
This commit is contained in:
Peter Šurda 2017-03-20 00:27:11 +01:00
parent 1af49a0165
commit 9a5f7442a0
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -168,9 +168,12 @@ if __name__ == "__main__":
"It is highly recommended to use the package manager " \ "It is highly recommended to use the package manager " \
"instead of setuptools." % (detectOS()) "instead of setuptools." % (detectOS())
prereqToPackages() prereqToPackages()
for module in detectPrereqs(True): try:
if not packageName[module]['optional']: for module in detectPrereqs(True):
sys.exit() if not packageName[module]['optional']:
sys.exit()
except KeyError:
sys.exit()
if not haveSetuptools: if not haveSetuptools:
print "It looks like you're missing setuptools." print "It looks like you're missing setuptools."
sys.exit() sys.exit()