Skip to content

Commit 719839f

Browse files
author
meihuisu
committed
rework the setup.list's ConfigureEnv's parsing and concatenation into
commandline
1 parent 03e060c commit 719839f

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

setup/setup.list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@
518518
"Required": "yes",
519519
"ConfigureEnv": [ "UCVM_INSTALL_PATH"],
520520
"ConfigureFlags": "--enable-tiff --without-curl TIFF_LIBS='-L${UCVM_INSTALL_PATH}/lib/tiff/lib -ltiff -L${UCVM_INSTALL_PATH}/lib/openssl/lib -lcrypto -lssl' TIFF_CFLAGS='-I${UCVM_INSTALL_PATH}/lib/tiff/include' SQLITE3_CFLAGS='-I${UCVM_INSTALL_PATH}/lib/sqlite/include' SQLITE3_LIBS='-L${UCVM_INSTALL_PATH}/lib/sqlite/lib -lsqlite3' SQLITE3='${UCVM_INSTALL_PATH}/lib/sqlite/bin/sqlite3'",
521+
521522
"oldConfigureFlags": "--enable-tiff --with-curl=${UCVM_INSTALL_PATH}/lib/curl/bin/curl-config TIFF_LIBS='-L${UCVM_INSTALL_PATH}/lib/tiff/lib -ltiff -L${UCVM_INSTALL_PATH}/lib/openssl/lib -lcrypto -lssl' TIFF_CFLAGS='-I${UCVM_INSTALL_PATH}/lib/tiff/include' SQLITE3_CFLAGS='-I${UCVM_INSTALL_PATH}/lib/sqlite/include' SQLITE3_LIBS='-L${UCVM_INSTALL_PATH}/lib/sqlite/lib -lsqlite3' SQLITE3='${UCVM_INSTALL_PATH}/lib/sqlite/bin/sqlite3'",
522523
"UCVMConfigureFlags": "--with-proj-include-path=${UCVM_INSTALL_PATH}/lib/proj/include --with-proj-lib-path=${UCVM_INSTALL_PATH}/lib/proj/lib",
523524
"Postprocess" : [

ucvm_setup.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,12 @@ def callAndRecord(command, nocall = False, noshell = True):
117117
else:
118118
print("WARN>>",env,"<< optional env is not set");
119119

120-
print(' ==> command used.. '+'_'.join(command))
120+
## print(' ==> command used.. '+'_'.join(command))
121+
print(' ==> command used.. '+ shlex.join(command))
121122
if nocall == False:
122123
if noshell == False :
123-
my_command=' '.join(command)
124+
## my_command=' '.join(command)
125+
my_command=shlex.join(command)
124126
proc = Popen([ my_command ], env=my_env, shell=True, stdout = PIPE, stderr = PIPE)
125127
retout, reterr = proc.communicate()
126128
retVal = proc.poll()
@@ -289,7 +291,9 @@ def installConfigMakeInstall(tarname, ucvmpath, type, config_data):
289291

290292
if "ConfigureFlags" in config_data and config_data["ConfigureFlags"] != "" :
291293
tmp = config_data["ConfigureFlags"].split(" ")
292-
configure_array +=shlex.split(config_data["ConfigureFlags"])
294+
flags = shlex.split(config_data["ConfigureFlags"])
295+
configure_array += flags
296+
293297
elif "Libraries" in config_data:
294298
## this is to work with our embedded libraries being installed in UCVM_INSTALL_PATH
295299
needs_array = config_data["Libraries"]
@@ -1021,15 +1025,17 @@ def _add2orderedToInstallList(library):
10211025
for library in librariesToInstall:
10221026
the_library = config_data["libraries"][library]
10231027
if "UCVMConfigureFlags" in the_library and the_library["UCVMConfigureFlags"] != "":
1024-
flags = the_library["UCVMConfigureFlags"].split(" ")
1028+
tmp_flags = the_library["UCVMConfigureFlags"].split(" ")
1029+
flags = shlex.split(the_library["UCVMConfigureFlags"])
10251030
ucvm_conf_command += flags
10261031

10271032
for model in modelsToInstall:
10281033
the_model = config_data["models"][model]
10291034

10301035
# We need to append the ucvm configure flags.
10311036
if "UCVMConfigureFlags" in the_model and the_model["UCVMConfigureFlags"] != "" :
1032-
flags = the_model["UCVMConfigureFlags"].split(" ")
1037+
tmp_flags = the_model["UCVMConfigureFlags"].split(" ")
1038+
flags=shlex.split(the_model["UCVMConfigureFlags"])
10331039
ucvm_conf_command += flags
10341040

10351041
ucvm_conf_command.append("--prefix=" + ucvmpath)

0 commit comments

Comments
 (0)