40 |
else: |
else: |
41 |
INSTALL_LIB="@INSTALL_LIB@" |
INSTALL_LIB="@INSTALL_LIB@" |
42 |
INSTALL_ASCDATA="@INSTALL_ASCDATA@" |
INSTALL_ASCDATA="@INSTALL_ASCDATA@" |
43 |
|
INSTALL_MODELS = os.path.abspath(INSTALL_ASCDATA+"/models") |
44 |
|
INSTALL_SOLVERS = os.path.abspath(INSTALL_ASCDATA+"/solvers") |
45 |
PYTHON="@PYTHON@" |
PYTHON="@PYTHON@" |
46 |
DEFAULT_ASCENDLIBRARY="""@DEFAULT_ASCENDLIBRARY@""" |
DEFAULT_ASCENDLIBRARY="""@DEFAULT_ASCENDLIBRARY@""" |
47 |
SEP=":" |
SEP=":" |
74 |
|
|
75 |
if os.environ.get('ASCENDLIBRARY'): |
if os.environ.get('ASCENDLIBRARY'): |
76 |
envmodels = [os.path.abspath(i) for i in os.environ['ASCENDLIBRARY'].split(SEP)] |
envmodels = [os.path.abspath(i) for i in os.environ['ASCENDLIBRARY'].split(SEP)] |
77 |
ascmodels = os.path.abspath(INSTALL_ASCDATA+"/models") |
if not INSTALL_MODELS in envmodels: |
78 |
ascsolvers = os.path.abspath(INSTALL_ASCDATA+"/solvers") |
envmodels.append(INSTALL_MODELS) |
|
if not ascmodels in envmodels: |
|
|
envmodels.append(ascmodels) |
|
79 |
os.environ['ASCENDLIBRARY'] = SEP.join(envmodels) |
os.environ['ASCENDLIBRARY'] = SEP.join(envmodels) |
80 |
restart = 1 |
restart = 1 |
81 |
if not ascsolvers in envmodels: |
|
82 |
envmodels.append(ascsolvers) |
if os.environ.get('ASCENDSOLVERS'): |
83 |
os.environ['ASCENDLIBRARY'] = SEP.join(envmodels) |
envsolvers = [os.path.abspath(i) for i in os.environ['ASCENDSOLVERS'].split(SEP)] |
84 |
|
if not INSTALL_SOLVERS in envsolvers: |
85 |
|
envsolvers.append(INSTALL_SOLVERS) |
86 |
|
os.environ['ASCENDSOLVERS'] = SEP.join(envsolvers) |
87 |
restart = 1 |
restart = 1 |
88 |
|
|
89 |
if restart: |
if restart: |
90 |
print "Restarting with corrected environment..." |
print "Restarting with corrected environment..." |
91 |
print " %s = %s" % (LDPATHVAR,os.environ.get(LDPATHVAR)) |
print " %s = %s" % (LDPATHVAR,os.environ.get(LDPATHVAR)) |
92 |
print " ASCENDLIBRARY = %s" % os.environ.get('ASCENDLIBRARY') |
print " ASCENDLIBRARY = %s" % os.environ.get('ASCENDLIBRARY') |
93 |
|
print " ASCENDSOLVERS = %s" % os.environ.get('ASCENDSOLVERS') |
94 |
script = os.path.join(sys.path[0],"ascend") |
script = os.path.join(sys.path[0],"ascend") |
95 |
print "PYTHON =",PYTHON |
print "PYTHON =",PYTHON |
96 |
print "script =",script |
print "script =",script |