/[escript]/branches/4.0fordebian/site_scons/site_init.py
ViewVC logotype

Diff of /branches/4.0fordebian/site_scons/site_init.py

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

branches/domexper/site_scons/site_init.py revision 3251 by jfenwick, Thu Oct 7 04:02:30 2010 UTC trunk/site_scons/site_init.py revision 3580 by gross, Tue Sep 6 00:31:35 2011 UTC
# Line 69  def findLibWithHeader(env, libs, header, Line 69  def findLibWithHeader(env, libs, header,
69      conf.Finish()      conf.Finish()
70      return inc_path, lib_path      return inc_path, lib_path
71    
72    
73  # Code to build .pyc from .py  # Code to build .pyc from .py
74  def build_py(target, source, env):  def build_py(target, source, env):
75      py_compile.compile(str(source[0]), str(target[0]))      try:
76      return 0         py_compile.compile(str(source[0]), str(target[0]), doraise=True)
77           return 0
78        except py_compile.PyCompileError as e:
79           print e
80           return 1
81          
82    
83  # Code to run unit_test executables  # Code to run unit_test executables
84  def runUnitTest(target, source, env):  def runUnitTest(target, source, env):
# Line 80  def runUnitTest(target, source, env): Line 86  def runUnitTest(target, source, env):
86    app = str(source[0].abspath)    app = str(source[0].abspath)
87    pn, sn= os.path.split(app)    pn, sn= os.path.split(app)
88    if not os.name== "nt":    if not os.name== "nt":
89       app = "cd "+pn+"; "+os.path.join(env['bininstall'],"escript")+" -bv "+os.path.join('.',sn)       app = "cd "+pn+"; "+os.path.join(env['bininstall'], "run-escript")+" -bv "+os.path.join('.',sn)
90    else:    else:
91        if env['usempi']:        if env['usempi']:
92            app = "cd %s & mpiexec -np %s -genvlist PYTHONPATH,OMP_NUM_THREADS,"\            app = "cd %s & mpiexec -np %s -genvlist PYTHONPATH,OMP_NUM_THREADS,"\
# Line 108  def runPyUnitTest(target, source, env): Line 114  def runPyUnitTest(target, source, env):
114         else:         else:
115             app = "cd "+ pn +" & "+sys.executable + " " + sn             app = "cd "+ pn +" & "+sys.executable + " " + sn
116     else:     else:
117       app = "cd "+pn+"; "+os.path.join(env['bininstall'],"escript")+" -ov "+sn       app = "cd "+pn+"; "+os.path.join(env['bininstall'], "run-escript")+" -ov "+sn
118     print "Executing test: ",app     print "Executing test: ",app
119     if env.Execute(app) == 0:     if env.Execute(app) == 0:
120        open(str(target[0]),'w').write("PASSED\n")        open(str(target[0]),'w').write("PASSED\n")
# Line 119  def runPyUnitTest(target, source, env): Line 125  def runPyUnitTest(target, source, env):
125    
126  def eps2pdf(target, source, env):  def eps2pdf(target, source, env):
127  #   if env.Execute("epstopdf "+str(source[0].abspath)+" -o "+str(target[0].abspath))!=0:  #   if env.Execute("epstopdf "+str(source[0].abspath)+" -o "+str(target[0].abspath))!=0:
128     if env.Execute("ps2pdf "+str(source[0].abspath)+" "+str(target[0].abspath))!=0:     if env.Execute("ps2pdf -dEPSCrop "+str(source[0].abspath)+" "+str(target[0].abspath))!=0:
129         return 1         return 1
130     return None     return None
131    

Legend:
Removed from v.3251  
changed lines
  Added in v.3580

  ViewVC Help
Powered by ViewVC 1.1.26