fixed install script
This commit is contained in:
parent
589eaf9a21
commit
4b22cae400
14
install.py
14
install.py
|
@ -16,7 +16,7 @@ def positiveInt(string):
|
||||||
Runs a subprocess using the command parameter.
|
Runs a subprocess using the command parameter.
|
||||||
Before running the command it displays a message
|
Before running the command it displays a message
|
||||||
that contains the provided description and where
|
that contains the provided description and where
|
||||||
the output will be sent. If an error occurs,
|
the output will be sent. If an error occurs,
|
||||||
the errorMsg is displayed.
|
the errorMsg is displayed.
|
||||||
"""
|
"""
|
||||||
def runSubProc(command, description, errorMsg, output):
|
def runSubProc(command, description, errorMsg, output):
|
||||||
|
@ -28,7 +28,7 @@ def runSubProc(command, description, errorMsg, output):
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
proc = subprocess.Popen(command, stdout=outputFile, stderr=subprocess.STDOUT, shell=True)
|
proc = subprocess.Popen(command, stdout=outputFile, stderr=subprocess.STDOUT, shell=True)
|
||||||
else:
|
else:
|
||||||
proc = subprocess.Popen(command, stdout=outputFile, stderr=subprocess.STDOUT)
|
proc = subprocess.Popen(command, stdout=outputFile, stderr=subprocess.STDOUT, shell=True)
|
||||||
proc.wait()
|
proc.wait()
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
print("Error installing: " + errorMsg)
|
print("Error installing: " + errorMsg)
|
||||||
|
@ -72,7 +72,7 @@ runSubProc(
|
||||||
"configure.out")
|
"configure.out")
|
||||||
|
|
||||||
runSubProc(
|
runSubProc(
|
||||||
[makeCommand, "-j"+j],
|
[makeCommand, "-j"+j],
|
||||||
"Running make ",
|
"Running make ",
|
||||||
"There was a make error",
|
"There was a make error",
|
||||||
"make.out")
|
"make.out")
|
||||||
|
@ -80,20 +80,20 @@ runSubProc(
|
||||||
|
|
||||||
if args.buildDocs:
|
if args.buildDocs:
|
||||||
runSubProc(
|
runSubProc(
|
||||||
[makeCommand, "-j"+j, "docs"],
|
[makeCommand, "-j"+j, "docs"],
|
||||||
"Building documentation ",
|
"Building documentation ",
|
||||||
"There was a documentation building error",
|
"There was a documentation building error",
|
||||||
"docs.out")
|
"docs.out")
|
||||||
|
|
||||||
runSubProc(
|
runSubProc(
|
||||||
[makeCommand, "install"],
|
makeCommand + " install",
|
||||||
"Installing ",
|
"Installing ",
|
||||||
"There was an installation error",
|
"There was an installation error",
|
||||||
"install.out")
|
"install.out")
|
||||||
|
|
||||||
if args.runTests:
|
if args.runTests:
|
||||||
runSubProc(
|
runSubProc(
|
||||||
["ctest", "-j"+j],
|
["ctest", "-j"+j],
|
||||||
"Testing ",
|
"Testing ",
|
||||||
"There was a testing error",
|
"There was a testing error",
|
||||||
"test.out")
|
"test.out")
|
||||||
|
|
Loading…
Reference in New Issue