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

Diff of /trunk/doc/SConscript

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

revision 2666 by gross, Tue Sep 8 23:31:32 2009 UTC revision 2667 by jfenwick, Thu Sep 17 01:49:11 2009 UTC
# Line 15  Line 15 
15  import os  import os
16  Import('*')  Import('*')
17    
18  example_deps = ['cookbook/cblib.py']  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:
# Line 40  example_files_allow_mpi = [ Line 44  example_files_allow_mpi = [
44  example_files_no_mpi = [  example_files_no_mpi = [
45  ]  ]
46    
47  #Now we add tests which depend on matplotlib  haveGMSH=(os.system("gmsh -version")/256==0)    #Do we have gmsh installed?
48    haveMPL=False                   #Do we have matplotlib?
49    haveGD=False                    #Does the matplotlib have griddata?
50  try:  try:
51       import matplotlib
52       haveMPL=True
53     from matplotlib.mlab import griddata     from matplotlib.mlab import griddata
54     example_files_no_mpi.append('usersguide/poisson_matplotlib.py')     haveGD=True
    example_files_allow_mpi.append('usersguide/wave.py')  
 #   example_deps.append('cookbook/heatrefraction_mesher001.py')  
 #   example_deps.append('cookbook/heatrefraction_mesher002.py')  
 #   example_deps.append('cookbook/heatrefraction001.py')  
 #   example_deps.append('cookbook/heatrefraction002.py')  
 #   example_files_no_mpi.append('cookbook/onedheatdiff001.py')  
 #   example_files_no_mpi.append('cookbook/onedheatdiff002.py')  
 #   example_files_no_mpi.append('cookbook/twodheatdiff.py')  
    import os  
    if os.system("gmsh -version")/256 ==0:   #gmsh found on this system  
 #   example_files_no_mpi.append('cookbook/test_heatref.py')  
     pass  
    else:  
     print "gmsh not found skipping examples"  
55  except ImportError:  except ImportError:
56     print "matplotlib not found - skipping example"     pass
57    
58    if not haveMPL:
59       print "matplotlib not found skipping some tests"
60    else:
61       if not haveGD:
62        print "matplotlib found but griddata not provided"
63    
64    if not haveGMSH:
65       print "gmsh not found"
66    
67    example_files_no_mpi.append('cookbook/onedheatdiff.py')
68    example_files_no_mpi.append('cookbook/onedheatdiff_var001.py')
69    example_files_no_mpi.append('cookbook/sandbox.py')
70    example_files_no_mpi.append('cookbook/twodheatdiff.py')
71    example_files_no_mpi.append('cookbook/wavesolver2d001.py')
72    example_files_no_mpi.append('cookbook/wavesolver2d002.py')
73    
74    
75    if haveMPL:
76       example_files_no_mpi.append('cookbook/onedheatdiff001.py')
77       example_files_no_mpi.append('cookbook/onedheatdiff002.py')
78       if haveGD:
79        example_files_no_mpi.append('cookbook/twodheatdiff001.py')
80        example_files_no_mpi.append('usersguide/poisson_matplotlib.py')
81        example_files_allow_mpi.append('usersguide/wave.py')
82        if haveGMSH:
83            example_files_no_mpi.append('cookbook/run_heatrefraction.py')
84    
85    # we want to make sure these are still added to the examples bundle even if we can't run them
86    if not haveGMSH:
87       example_deps.append('cookbook/run_heatrefraction.py')
88    if not haveGD:
89       example_deps.append('cookbook/twodheatdiff001.py')
90       example_deps.append('usersguide/poisson_matplotlib.py')
91       example_deps.append('usersguide/wave.py')
92    if not haveMPL:
93       example_deps.append('cookbook/onedheatdiff001.py')
94       example_deps.append('cookbook/onedheatdiff002.py')
95    
96    
97  example_files= example_files_allow_mpi + example_files_no_mpi + example_deps  example_files= example_files_allow_mpi + example_files_no_mpi + example_deps
98    
# Line 87  env.Alias('examples_tarfile',tmp2) Line 120  env.Alias('examples_tarfile',tmp2)
120  #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)
121  #env.Alias('examples_tarfile', '#release/doc/escript_examples.tar.gz')  #env.Alias('examples_tarfile', '#release/doc/escript_examples.tar.gz')
122    
123    local_env.SConscript(dirs = ['#/doc/cookbook'], build_dir='#/build/$PLATFORM/doc/cookbook', duplicate=1)
124  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)
125  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)
126  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)

Legend:
Removed from v.2666  
changed lines
  Added in v.2667

  ViewVC Help
Powered by ViewVC 1.1.26