Update setup.py

This commit is contained in:
Scott King 2017-05-07 01:54:59 -06:00 committed by GitHub
parent ceef2811bf
commit a6295dcc0f

View File

@ -131,7 +131,6 @@ def prereqToPackages():
if detectPrereqs(True): if detectPrereqs(True):
print "%s %s" % (packageManager[detectOS()], print "%s %s" % (packageManager[detectOS()],
" ".join(detectPrereqs(True))) " ".join(detectPrereqs(True)))
for package in detectPrereqs(True): for package in detectPrereqs(True):
try: try:
if packageName[package]['optional']: if packageName[package]['optional']:
@ -139,18 +138,21 @@ def prereqToPackages():
except KeyError: except KeyError:
pass pass
def compilerToPackages(): def compilerToPackages():
if not detectOS() in compiling: if not detectOS() in compiling:
return return
print "You can install the requirements by running, as root:" print "You can install the requirements by running, as sudo or root:"
print "%s %s" % ( if compiling[detectOS()]:
packageManager[detectOS()], compiling[detectOS()]) print "%s %s" % (packageManager[detectOS()],
compiling[detectOS()])
if __name__ == "__main__": if __name__ == "__main__":
detectOS.result = None detectOS.result = None
detectPrereqs.result = None detectPrereqs.result = None
if detectPrereqs(True) and detectOS() in packageManager: if detectPrereqs(True) and detectOS() in packageManager:
if detectOS() is not None: if detectOS() is not None and detectOS.result != "Windows":
print "It looks like you're using %s. " \ print "It looks like you're using %s. " \
"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())
@ -160,7 +162,7 @@ if __name__ == "__main__":
if not packageName[module]['optional']: if not packageName[module]['optional']:
sys.exit() sys.exit()
except KeyError: except KeyError:
print('Checking %s' % module) print 'Checking %s' % module
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()