Update setup.py
This commit is contained in:
parent
ceef2811bf
commit
a6295dcc0f
26
setup.py
26
setup.py
|
@ -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,28 +138,31 @@ 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())
|
||||||
prereqToPackages()
|
prereqToPackages()
|
||||||
for module in detectPrereqs(True):
|
for module in detectPrereqs(True):
|
||||||
try:
|
try:
|
||||||
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()
|
||||||
|
|
Reference in New Issue
Block a user