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 untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

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