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

Annotation of /trunk/scons/scons_extensions.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 682 - (hide annotations)
Mon Mar 27 02:43:09 2006 UTC (13 years ago) by robwdcock
File MIME type: text/x-python
File size: 2521 byte(s)
+ NEW BUILD SYSTEM

This commit contains the new build system with cross-platform support.
Most things work are before though you can have more control.

ENVIRONMENT settings have changed:
+ You no longer require LD_LIBRARY_PATH or PYTHONPATH to point to the
esysroot for building and testing performed via scons
+ ACcESS altix users: It is recommended you change your modules to load
the latest intel compiler and other libraries required by boost to match
the setup in svn (you can override). The correct modules are as follows

module load intel_cc.9.0.026
export
MODULEPATH=${MODULEPATH}:/data/raid2/toolspp4/modulefiles/gcc-3.3.6
module load boost/1.33.0/python-2.4.1
module load python/2.4.1
module load numarray/1.3.3


1 elspeth 645
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 jgs 268 # Extensions to Scons
12    
13     import py_compile
14     import sys
15 jgs 297 import os
16 jgs 268
17     # Code to build .pyc from .py
18     def build_py(target, source, env):
19     py_compile.compile(str(source[0]), str(target[0]))
20     return None
21 jgs 297
22     # Code to run unit_test executables
23     def runUnitTest(target, source, env):
24     app = str(source[0].abspath)
25 robwdcock 682 if not env.Execute(app):
26 jgs 297 open(str(target[0]),'w').write("PASSED\n")
27 jgs 359 else:
28     return 1
29 jgs 297 return None
30 cochrane 370
31 robwdcock 682 def runPyUnitTest(target, source, env):
32     app = 'python '+str(source[0].abspath)
33     if not env.Execute(app):
34     open(str(target[0]),'w').write("PASSED\n")
35     else:
36     return 1
37     return None
38    
39 cochrane 370 # code to build epydoc docs
40     def build_epydoc(target, source, env):
41     # get where I am currently, just as a reference
42     pwd = os.getcwd()
43    
44     # get the full path of the runepydoc script
45     runepydoc = str(source[0].abspath)
46    
47     # use this path to work out where the doc directory is
48     dirs = runepydoc.split('/')
49     dirs = dirs[:-3] # trim the last two entries: this is now the doc dir path
50     docdir = '/'.join(dirs) # this is the backwards python way to do it
51     # (I'm feeling in a perl mood today...)
52    
53     # change into the relevant dir
54     os.chdir(docdir)
55    
56     # run the epydoc script
57     if not os.system(runepydoc):
58     os.chdir(pwd)
59     open(str(target[0]), 'w').write("Documentation built\n")
60     else:
61     return 1
62     return None
63    
64     # build doxygen docs
65     def build_doxygen(target, source, env):
66     # get where I am currently, just as a reference
67     pwd = os.getcwd()
68    
69     # get the full path of the rundoxygen script
70     rundoxygen = str(source[0].abspath)
71    
72     # use this path to work out where the doc directory is
73     dirs = rundoxygen.split('/')
74     dirs = dirs[:-2] # trim the last two entries: this is now the doc dir path
75     docdir = '/'.join(dirs) # this is the backwards python way to do it
76     # (I'm feeling in a perl mood today...)
77    
78     # change into the relevant dir
79     os.chdir(docdir)
80    
81     # run the doxygen script
82     if not os.system(rundoxygen):
83     os.chdir(pwd)
84     open(str(target[0]), 'w').write("Documentation built\n")
85     else:
86     return 1
87     return None

  ViewVC Help
Powered by ViewVC 1.1.26