/[escript]/trunk/doc/SConscript
ViewVC logotype

Diff of /trunk/doc/SConscript

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

revision 2537 by jfenwick, Fri Jul 17 05:50:35 2009 UTC revision 2677 by jfenwick, Tue Sep 22 00:48:00 2009 UTC
# Line 1  Line 1 
1    
2  ########################################################  ########################################################
3  #  #
4  # Copyright (c) 2003-2008 by University of Queensland  # Copyright (c) 2003-2009 by University of Queensland
5  # Earth Systems Science Computational Center (ESSCC)  # Earth Systems Science Computational Center (ESSCC)
6  # http://www.uq.edu.au/esscc  # http://www.uq.edu.au/esscc
7  #  #
# Line 14  Line 14 
14    
15  import os  import os
16  Import('*')  Import('*')
17    
18    example_deps = ['cookbook/cblib.py', 'cookbook/heatrefraction_mesher001.py',
19      'cookbook/heatrefraction_mesher002.py',
20      'cookbook/heatrefraction001.py',
21      'cookbook/heatrefraction002.py'
22    ]
23    
24  #  #
25  # these are the release examples in example sub directory:  # these are the release examples in example sub directory:
26  #  #
# Line 25  example_files_allow_mpi = [ Line 32  example_files_allow_mpi = [
32   'geotutorial/backward_euler.py',   'geotutorial/backward_euler.py',
33   'usersguide/lit_driven_cavity.py',   'usersguide/lit_driven_cavity.py',
34   'usersguide/mount.py',   'usersguide/mount.py',
  'usersguide/wave.py',  
35   'usersguide/heatedblock.py',   'usersguide/heatedblock.py',
36   'usersguide/helmholtz.py',   'usersguide/helmholtz.py',
37   'usersguide/fluid.py',   'usersguide/fluid.py',
38   'usersguide/poisson.py',   'usersguide/poisson.py',
39   'usersguide/diffusion.py',   'usersguide/diffusion.py',
40     'usersguide/poisson_vtk.py',
41     'usersguide/slip.py',
42     'usersguide/int_save.py'
43  ]  ]
44    
45  example_files_no_mpi = []  example_files_no_mpi = [
46    ]
47    
48    haveGMSH=(os.system("gmsh -version")/256==0)    #Do we have gmsh installed?
49    haveMPL=False                   #Do we have matplotlib?
50    haveGD=False                    #Does the matplotlib have griddata?
51    
52    mplmagicversion='0.98.5'
53    
54    try:
55       import matplotlib
56       haveMPL=True
57       mplversion=matplotlib.__version__
58       from matplotlib.mlab import griddata
59       haveGD=True
60    except ImportError:
61       pass
62    
63    if not haveMPL:
64       print "matplotlib not found skipping some tests"
65    else:
66       if mplversion<mplmagicversion:
67        print "matplotlib found but version too early. Some tests skipped."
68    
69    if not haveGMSH:
70       print "gmsh not found"
71    
72    example_files_no_mpi.append('cookbook/onedheatdiff.py')
73    example_files_no_mpi.append('cookbook/onedheatdiff_var001.py')
74    example_files_no_mpi.append('cookbook/sandbox.py')
75    example_files_no_mpi.append('cookbook/twodheatdiff.py')
76    example_files_no_mpi.append('cookbook/wavesolver2d001.py')
77    example_files_no_mpi.append('cookbook/wavesolver2d002.py')
78    
79    
80    if haveMPL:
81       example_files_no_mpi.append('cookbook/onedheatdiff001.py')
82       example_files_no_mpi.append('cookbook/onedheatdiff002.py')
83       if mplversion>=mplmagicversion:
84        example_files_no_mpi.append('cookbook/twodheatdiff001.py')
85        example_files_no_mpi.append('usersguide/poisson_matplotlib.py')
86        example_files_allow_mpi.append('usersguide/wave.py')
87        if haveGMSH:
88            example_files_no_mpi.append('cookbook/run_heatrefraction.py')
89    
90    # we want to make sure these are still added to the examples bundle even if we can't run them
91    if not haveGMSH:
92       example_deps.append('cookbook/run_heatrefraction.py')
93    if not haveGD:
94       example_deps.append('cookbook/twodheatdiff001.py')
95       example_deps.append('usersguide/poisson_matplotlib.py')
96       example_deps.append('usersguide/wave.py')
97    if not haveMPL:
98       example_deps.append('cookbook/onedheatdiff001.py')
99       example_deps.append('cookbook/onedheatdiff002.py')
100    
101    
102  example_files= example_files_allow_mpi + example_files_no_mpi  example_files= example_files_allow_mpi + example_files_no_mpi + example_deps
103    
104    
105  ex2=[ os.path.join("examples",str(x)) for x in example_files]  ex2=[ os.path.join("examples",str(x)) for x in example_files]
# Line 61  env.Alias('examples_tarfile',tmp2) Line 125  env.Alias('examples_tarfile',tmp2)
125  #if 'Tar' in dir(env): env.Tar('#/release/doc/escript_examples.tar.gz', example_files,chdir=src_dir)  #if 'Tar' in dir(env): env.Tar('#/release/doc/escript_examples.tar.gz', example_files,chdir=src_dir)
126  #env.Alias('examples_tarfile', '#release/doc/escript_examples.tar.gz')  #env.Alias('examples_tarfile', '#release/doc/escript_examples.tar.gz')
127    
128    local_env.SConscript(dirs = ['#/doc/cookbook'], build_dir='#/build/$PLATFORM/doc/cookbook', duplicate=1)
129  local_env.SConscript(dirs = ['#/doc/user'], build_dir='#/build/$PLATFORM/doc/user', duplicate=1)  local_env.SConscript(dirs = ['#/doc/user'], build_dir='#/build/$PLATFORM/doc/user', duplicate=1)
130  local_env.SConscript(dirs = ['#/doc/epydoc'], build_dir='#/build/$PLATFORM/doc/epydoc', duplicate=1)  local_env.SConscript(dirs = ['#/doc/epydoc'], build_dir='#/build/$PLATFORM/doc/epydoc', duplicate=1)
131  local_env.SConscript(dirs = ['#/doc/doxygen'], build_dir='#/build/$PLATFORM/doc/doxygen', duplicate=1)  local_env.SConscript(dirs = ['#/doc/doxygen'], build_dir='#/build/$PLATFORM/doc/doxygen', duplicate=1)
132  local_env.SConscript(dirs = ['#/doc/install'], build_dir='#/build/$PLATFORM/doc/install', duplicate=1)  local_env.SConscript(dirs = ['#/doc/install'], build_dir='#/build/$PLATFORM/doc/install', duplicate=1)
133  local_env.SConscript(dirs = ['#/doc/examples'], build_dir='#/build/$PLATFORM/doc/examples', duplicate=1, exports=[ 'example_files_allow_mpi' , 'example_files_no_mpi' ])  local_env.SConscript(dirs = ['#/doc/examples'], build_dir='#/build/$PLATFORM/doc/examples', duplicate=1, exports=[ 'example_files_allow_mpi' , 'example_files_no_mpi', 'example_deps' ])
134    
135    

Legend:
Removed from v.2537  
changed lines
  Added in v.2677

  ViewVC Help
Powered by ViewVC 1.1.26