/[ascend]/trunk/pygtk/ascend.in
ViewVC logotype

Diff of /trunk/pygtk/ascend.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1613 by jpye, Tue Jul 24 07:29:42 2007 UTC revision 1614 by jpye, Mon Sep 3 06:54:37 2007 UTC
# Line 40  if platform.system()=="Windows": Line 40  if platform.system()=="Windows":
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=":"
# Line 72  if not os.environ.get('ASC_GDB'): Line 74  if not os.environ.get('ASC_GDB'):
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

Legend:
Removed from v.1613  
changed lines
  Added in v.1614

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22