/[escript]/branches/domexper/doc/SConscript
ViewVC logotype

Diff of /branches/domexper/doc/SConscript

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

revision 2502 by gross, Tue Jun 30 05:49:22 2009 UTC revision 2906 by gross, Tue Feb 2 05:26:03 2010 UTC
# Line 1  Line 1 
1    
2  ########################################################  ########################################################
3  #  #
4  # Copyright (c) 2003-2008 by University of Queensland  # Copyright (c) 2003-2010 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    #_deps is for files which end in .py and are required for
19    # testing but should not be invoked directly themselves
20    example_deps = ['cookbook/heatrefraction_mesher001.py',
21      'cookbook/heatrefraction_mesher002.py',
22      'cookbook/heatrefraction001.py',
23      'cookbook/heatrefraction002.py',
24      'cookbook/cblib1.py',
25      'cookbook/cblib2.py'
26    ]
27    
28  #  #
29  # these are the release examples in example sub directory:  # these are the release examples in example sub directory:
30  #  #
# Line 25  example_files_allow_mpi = [ Line 36  example_files_allow_mpi = [
36   'geotutorial/backward_euler.py',   'geotutorial/backward_euler.py',
37   'usersguide/lit_driven_cavity.py',   'usersguide/lit_driven_cavity.py',
38   'usersguide/mount.py',   'usersguide/mount.py',
  'usersguide/wave.py',  
39   'usersguide/heatedblock.py',   'usersguide/heatedblock.py',
40   'usersguide/helmholtz.py',   'usersguide/helmholtz.py',
41   'usersguide/fluid.py',   'usersguide/fluid.py',
42   'usersguide/poisson.py',   'usersguide/poisson.py',
43   'usersguide/diffusion.py',   'usersguide/diffusion.py',
44     'usersguide/poisson_vtk.py',
45     'usersguide/slip.py',
46     'usersguide/int_save.py',
47  ]  ]
48    
49  example_files_no_mpi = [  example_files_no_mpi = [
  'pyvisi/poisson_with_pyvisi.py',  
  'pyvisi/streamline.py',  
  'pyvisi/legend.py',  
  'pyvisi/data_sample_images/image.jpg',  
  'pyvisi/data_sample_images/wave00.jpg',  
  'pyvisi/data_sample_images/seriesofcuts04.jpg',  
  'pyvisi/data_sample_images/movie000943.jpg',  
  'pyvisi/data_sample_images/seriesofreads0102.jpg',  
  'pyvisi/data_sample_images/text.jpg',  
  'pyvisi/data_sample_images/map.jpg',  
  'pyvisi/data_sample_images/seriesofcuts02.jpg',  
  'pyvisi/data_sample_images/diffusion02.jpg',  
  'pyvisi/data_sample_images/movie000941.jpg',  
  'pyvisi/data_sample_images/rectangle.jpg',  
  'pyvisi/data_sample_images/seriesofreads0103.jpg',  
  'pyvisi/data_sample_images/movie000940.jpg',  
  'pyvisi/data_sample_images/diffusion04.jpg',  
  'pyvisi/data_sample_images/legend.jpg',  
  'pyvisi/data_sample_images/carpet.jpg',  
  'pyvisi/data_sample_images/diffusion01.jpg',  
  'pyvisi/data_sample_images/poisson.jpg',  
  'pyvisi/data_sample_images/diffusion03.jpg',  
  'pyvisi/data_sample_images/velocity.jpg',  
  'pyvisi/data_sample_images/movie000946.jpg',  
  'pyvisi/data_sample_images/movie000945.jpg',  
  'pyvisi/data_sample_images/all.jpg',  
  'pyvisi/data_sample_images/movie000942.jpg',  
  'pyvisi/data_sample_images/seriesofcuts03.jpg',  
  'pyvisi/data_sample_images/streamline.jpg',  
  'pyvisi/data_sample_images/seriesofcuts01.jpg',  
  'pyvisi/data_sample_images/wave02.jpg',  
  'pyvisi/data_sample_images/ellipsoid.jpg',  
  'pyvisi/data_sample_images/seriesofreads0100.jpg',  
  'pyvisi/data_sample_images/seriesofreads0099.jpg',  
  'pyvisi/data_sample_images/movie.mpg',  
  'pyvisi/data_sample_images/movie000947.jpg',  
  'pyvisi/data_sample_images/logo.jpg',  
  'pyvisi/data_sample_images/heatedblock.jpg',  
  'pyvisi/data_sample_images/contour.jpg',  
  'pyvisi/data_sample_images/seriesofreads0101.jpg',  
  'pyvisi/data_sample_images/movie000948.jpg',  
  'pyvisi/data_sample_images/maponscalarclipwithrotation.jpg',  
  'pyvisi/data_sample_images/movie000938.jpg',  
  'pyvisi/data_sample_images/movie000944.jpg',  
  'pyvisi/data_sample_images/wave01.jpg',  
  'pyvisi/data_sample_images/movie000939.jpg',  
  'pyvisi/data_sample_images/helmholtz.jpg',  
  'pyvisi/data_sample_images/seriesofcuts00.jpg',  
  'pyvisi/text.py',  
  'pyvisi/wave_with_pyvisi.py',  
  'pyvisi/data_meshes/tempvel-000942.vtu',  
  'pyvisi/data_meshes/tempvel-000943.vtu',  
  'pyvisi/data_meshes/interior_3D.xml',  
  'pyvisi/data_meshes/tempvel-000947.vtu',  
  'pyvisi/data_meshes/without_st.0700.xml',  
  'pyvisi/data_meshes/tempvel-000940.vtu',  
  'pyvisi/data_meshes/access_logo.jpg',  
  'pyvisi/data_meshes/phi_talus_lava.0101.vtu',  
  'pyvisi/data_meshes/phi_talus_lava.0099.vtu',  
  'pyvisi/data_meshes/tempvel-000945.vtu',  
  'pyvisi/data_meshes/tempvel-000944.vtu',  
  'pyvisi/data_meshes/phi_talus_lava.0103.vtu',  
  'pyvisi/data_meshes/tempvel-000938.vtu',  
  'pyvisi/data_meshes/flinders.jpg',  
  'pyvisi/data_meshes/phi_talus_lava.0102.vtu',  
  'pyvisi/data_meshes/tempvel-000941.vtu',  
  'pyvisi/data_meshes/phi_talus_lava.0100.vtu',  
  'pyvisi/data_meshes/tempvel-000946.vtu',  
  'pyvisi/data_meshes/tempvel-000948.vtu',  
  'pyvisi/data_meshes/tempvel-000939.vtu',  
  'pyvisi/helmholtz_with_pyvisi.py',  
  'pyvisi/all.py',  
  'pyvisi/map.py',  
  'pyvisi/offscreen.py',  
  'pyvisi/logo.py',  
  'pyvisi/rectangle.py',  
  'pyvisi/diffusion_with_pyvisi.py',  
  'pyvisi/heatedblock_with_pyvisi.py',  
  'pyvisi/movie.py',  
  'pyvisi/seriesofcuts.py',  
  'pyvisi/velocityonplanecut.py',  
  'pyvisi/ellipsoidonplaneclip.py',  
  'pyvisi/maponscalarclipwithrotation.py',  
  'pyvisi/seriesofreads.py',  
  'pyvisi/contour.py',  
  'pyvisi/carpet.py',  
  'pyvisi/image.py'  
50  ]  ]
51    
52  example_files= example_files_allow_mpi + example_files_no_mpi  haveGMSH=(os.system("gmsh -version")/256==0)    #Do we have gmsh installed?
53    haveMPL=False                   #Do we have matplotlib?
54    haveGD=False                    #Does the matplotlib have griddata?
55    
56    mplmagicversion='0.98.5'
57    
58    try:
59       import matplotlib
60       haveMPL=True
61       mplversion=matplotlib.__version__
62       from matplotlib.mlab import griddata
63       haveGD=True
64    except ImportError:
65       pass
66    
67    if not haveMPL:
68       print "matplotlib not found skipping some tests"
69    else:
70       if mplversion<mplmagicversion:
71        print "matplotlib found but version too early. Some tests skipped."
72    
73    if not haveGMSH:
74       print "gmsh not found"
75    
76    example_files_allow_mpi.append('cookbook/onedheatdiffbase.py')
77    #example_files_no_mpi.append('cookbook/sandbox.py')
78    example_files_no_mpi.append('cookbook/twodheatdiff.py')
79    example_files_no_mpi.append('cookbook/wavesolver2d001.py')
80    example_files_no_mpi.append('cookbook/wavesolver2d002.py')
81    
82    
83    if haveMPL:
84       example_files_no_mpi.append('cookbook/onedheatdiff001.py')
85       example_files_no_mpi.append('cookbook/onedheatdiff001b.py')
86       example_files_no_mpi.append('cookbook/onedheatdiff002.py')
87       if mplversion>=mplmagicversion:
88        example_files_no_mpi.append('cookbook/twodheatdiff001.py')
89        example_files_no_mpi.append('usersguide/poisson_matplotlib.py')
90        example_files_allow_mpi.append('usersguide/wave.py')
91        if haveGMSH:
92            example_files_no_mpi.append('cookbook/run_heatrefraction.py')
93    if haveGMSH:
94      example_files_no_mpi.append('usersguide/trapezoid.py')
95      example_files_no_mpi.append('usersguide/quad.py')
96      example_files_no_mpi.append('usersguide/brick.py')
97      example_files_no_mpi.append('usersguide/refine.py')
98    
99    
100    # we want to make sure these are still added to the examples bundle even if we can't run them
101    if not haveGMSH:
102       example_deps.append('cookbook/run_heatrefraction.py')
103       example_deps.append('usersguide/trapezoid.py')
104       example_deps.append('usersguide/quad.py')
105       example_deps.append('usersguide/brick.py')
106       example_deps.append('usersguide/refine.py')
107    if not haveGD:
108       example_deps.append('cookbook/twodheatdiff001.py')
109       example_deps.append('usersguide/poisson_matplotlib.py')
110       example_deps.append('usersguide/wave.py')
111    if not haveMPL:
112       example_deps.append('cookbook/onedheatdiff001.py')
113       example_deps.append('cookbook/onedheatdiff001b.py')
114       example_deps.append('cookbook/onedheatdiff002.py')
115    
116    
117    example_files= example_files_allow_mpi + example_files_no_mpi + example_deps
118    
119    
120    ex2=[ os.path.join("examples",str(x)) for x in example_files]
121    
122  #==========================================================================================  #==========================================================================================
123    
# Line 132  src_dir = local_env.Dir('.').srcnode().a Line 126  src_dir = local_env.Dir('.').srcnode().a
126  release_dir=local_env.Dir('#/release/doc/').srcnode().abspath  release_dir=local_env.Dir('#/release/doc/').srcnode().abspath
127    
128  tmp1 = env.Command("#/release/doc/escript_examples.zip", None,  tmp1 = env.Command("#/release/doc/escript_examples.zip", None,
129  "zip "+os.path.join(release_dir,"escript_examples.zip ") +" ".join(example_files),chdir=src_dir)  "zip "+os.path.join(release_dir,"escript_examples.zip ") +" ".join(ex2),chdir=src_dir)
130  env.Alias('examples_zipfile', tmp1)  env.Alias('examples_zipfile', tmp1)
131    
132    
133  #Need to use explicit tar rather than the tar builder due to problems getting it not to put  #Need to use explicit tar rather than the tar builder due to problems getting it not to put
134  #unwanted path components in the tar file  #unwanted path components in the tar file
135  #--transform on tar is not supported on savanna  #--transform on tar is not supported on savanna
136  tmp2 = env.Command("#/release/doc/escript_examples.tar.gz", None, "tar -czf "+os.path.join(release_dir,"escript_examples.tar.gz ")+"  ".join(example_files), chdir=src_dir)  tmp2 = env.Command("#/release/doc/escript_examples.tar.gz", None, "tar -czf "+os.path.join(release_dir,"escript_examples.tar.gz ")+"  ".join(ex2), chdir=src_dir)
137  env.Alias('examples_tarfile',tmp2)  env.Alias('examples_tarfile',tmp2)
138    
139  #env=Environment(TARFLAGS = "-c -z",chdir=src_dir)  #env=Environment(TARFLAGS = "-c -z",chdir=src_dir)
140  #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)
141  #env.Alias('examples_tarfile', '#release/doc/escript_examples.tar.gz')  #env.Alias('examples_tarfile', '#release/doc/escript_examples.tar.gz')
142    
143    local_env.SConscript(dirs = ['#/doc/cookbook'], build_dir='#/build/$PLATFORM/doc/cookbook', duplicate=1)
144  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)
145  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)
146  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)
147  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)
148  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' ])
149    
150    

Legend:
Removed from v.2502  
changed lines
  Added in v.2906

  ViewVC Help
Powered by ViewVC 1.1.26