Skip to content

Commit 6ca5950

Browse files
author
meihuisu
committed
add setting of UCVM_SRC_PATH and UCVM_INSTALL_PATH from env if avail
1 parent f5c6f4a commit 6ca5950

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

ucvm_setup.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
# Set the version number for the installation script.
2323
VERSION = "25.7.0"
2424

25+
# UCVM_INSTALL_PATH and UCVM_SRC_PATH
26+
UCVM_SRC_PATH = os.getcwd()
27+
UCVM_INSTALL_PATH = os.getcwd()
28+
2529
# User defined variables.
2630
all_flag = False
2731
dynamic_flag = True
@@ -775,6 +779,13 @@ def _addPROJ_LIB_python() :
775779
except OSError as e:
776780
eG(e, "Parsing available model list.")
777781

782+
783+
### set UCVM_SRC_PATH and UCVM_SRC_PATH from the environment string..
784+
my_srcpath=getSpecialEnvSetting('UCVM_SRC_PATH')
785+
if(my_srcpath != None):
786+
UCVM_SRC_PATH=my_srcpath
787+
788+
778789
print("\nPlease answer the following questions to install UCVM.\n")
779790
print("Note that this install and build process may take up to an hour depending on your")
780791
print("computer speed.")
@@ -828,6 +839,8 @@ def _addPROJ_LIB_python() :
828839
call(["mkdir", "-p", ucvmpath+'/work'])
829840
call(["mkdir", "-p", ucvmpath+'/lib'])
830841

842+
SRC_INSTALL_PATH = ucvmpath
843+
831844
## print(config_data["models"].keys())
832845

833846
for model in sorted(iter(config_data["models"].keys()), key=lambda k: config_data["models"][k]["Order"]):
@@ -1020,9 +1033,9 @@ def _addPROJ_LIB_python() :
10201033
callAndRecord(["make"])
10211034

10221035
if platform.system() == "Darwin" or platform.system() == "Linux" or dynamic_flag == True:
1023-
makeBashScript(os.getcwd(), ucvmpath ,modelsToInstall, librariesToInstall)
1024-
makePythonScript(os.getcwd(), ucvmpath ,modelsToInstall, librariesToInstall)
1025-
makeDyLibNameChangeScript(os.getcwd(), ucvmpath, modelsToInstall, librariesToInstall)
1036+
makeBashScript(UCVM_SRC_PATH, ucvmpath ,modelsToInstall, librariesToInstall)
1037+
makePythonScript(UCVM_SRC_PATH, ucvmpath ,modelsToInstall, librariesToInstall)
1038+
makeDyLibNameChangeScript(UCVM_SRC_PATH, ucvmpath, modelsToInstall, librariesToInstall)
10261039

10271040
print("\nInstalling UCVM")
10281041
callAndRecord(["make", "install"])

0 commit comments

Comments
 (0)