Added support for CMAKE builds by executing commands with shell=True
This commit is contained in:
parent
970537e571
commit
86f1632a8d
|
@ -32,8 +32,8 @@ def install_lib(lib, src_dir, work_dir, inst_dir, comp_cc, comp_cxx, comp_fc, bu
|
||||||
if not os.path.exists(lib['name']+"-"+lib['version']):
|
if not os.path.exists(lib['name']+"-"+lib['version']):
|
||||||
|
|
||||||
print("Downloading Source Code")
|
print("Downloading Source Code")
|
||||||
load_command = lib['download'].replace("$VERSION_UNDERSCORE", lib_version.replace(".", "_")).replace("$VERSION", lib_version).split()
|
load_command = lib['download'].replace("$VERSION_UNDERSCORE", lib_version.replace(".", "_")).replace("$VERSION", lib_version)
|
||||||
err = subprocess.call(load_command, stdout=logfile, stderr=logfile)
|
err = subprocess.call(load_command, stdout=logfile, stderr=logfile, shell=True)
|
||||||
if err != 0:
|
if err != 0:
|
||||||
print("Error: Download of "+lib_name+" v."+lib_version+" failed!")
|
print("Error: Download of "+lib_name+" v."+lib_version+" failed!")
|
||||||
print("See "+logfile_path+" for details")
|
print("See "+logfile_path+" for details")
|
||||||
|
@ -103,6 +103,9 @@ def install_lib(lib, src_dir, work_dir, inst_dir, comp_cc, comp_cxx, comp_fc, bu
|
||||||
print("See "+logfile_path+" for details")
|
print("See "+logfile_path+" for details")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
print("Library "+lib_name+" has been installed successfully!\n")
|
print("Library "+lib_name+" has been installed successfully!\n")
|
||||||
|
|
||||||
|
# copy logfile to install location
|
||||||
|
if not verbose:
|
||||||
build_output_path = inst_dir+"/"+"build_info"
|
build_output_path = inst_dir+"/"+"build_info"
|
||||||
if not os.path.exists(build_output_path):
|
if not os.path.exists(build_output_path):
|
||||||
os.makedirs(build_output_path)
|
os.makedirs(build_output_path)
|
||||||
|
|
Loading…
Reference in New Issue