/[escript]/trunk/scons/scons_extensions.py
ViewVC logotype

Diff of /trunk/scons/scons_extensions.py

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

revision 359 by jgs, Thu Dec 15 01:08:03 2005 UTC revision 645 by elspeth, Fri Mar 24 01:10:42 2006 UTC
# Line 1  Line 1 
1    
2    #          Copyright 2006 by ACcESS MNRF                  
3    #                                                          
4    #              http://www.access.edu.au                    
5    #       Primary Business: Queensland, Australia            
6    #  Licensed under the Open Software License version 3.0    
7    #     http://www.opensource.org/licenses/osl-3.0.php      
8    #                                                          
9    
10    
11  # Extensions to Scons  # Extensions to Scons
12    
13  import py_compile  import py_compile
# Line 15  def runUnitTest(target, source, env): Line 25  def runUnitTest(target, source, env):
25    if not os.system(app):    if not os.system(app):
26      open(str(target[0]),'w').write("PASSED\n")      open(str(target[0]),'w').write("PASSED\n")
27    else:    else:
     open(str(target[0]),'w').write("FAILED\n")  
28      return 1      return 1
29    return None    return None
30    
31    # code to build epydoc docs
32    def build_epydoc(target, source, env):
33        # get where I am currently, just as a reference
34        pwd = os.getcwd()
35    
36        # get the full path of the runepydoc script
37        runepydoc = str(source[0].abspath)
38    
39        # use this path to work out where the doc directory is
40        dirs = runepydoc.split('/')
41        dirs = dirs[:-3] # trim the last two entries: this is now the doc dir path
42        docdir = '/'.join(dirs) # this is the backwards python way to do it
43        # (I'm feeling in a perl mood today...)
44    
45        # change into the relevant dir
46        os.chdir(docdir)
47    
48        # run the epydoc script
49        if not os.system(runepydoc):
50        os.chdir(pwd)
51        open(str(target[0]), 'w').write("Documentation built\n")
52        else:
53        return 1
54        return None
55    
56    # build doxygen docs
57    def build_doxygen(target, source, env):
58        # get where I am currently, just as a reference
59        pwd = os.getcwd()
60    
61        # get the full path of the rundoxygen script
62        rundoxygen = str(source[0].abspath)
63    
64        # use this path to work out where the doc directory is
65        dirs = rundoxygen.split('/')
66        dirs = dirs[:-2] # trim the last two entries: this is now the doc dir path
67        docdir = '/'.join(dirs) # this is the backwards python way to do it
68        # (I'm feeling in a perl mood today...)
69    
70        # change into the relevant dir
71        os.chdir(docdir)
72    
73        # run the doxygen script
74        if not os.system(rundoxygen):
75        os.chdir(pwd)
76        open(str(target[0]), 'w').write("Documentation built\n")
77        else:
78        return 1
79        return None

Legend:
Removed from v.359  
changed lines
  Added in v.645

  ViewVC Help
Powered by ViewVC 1.1.26