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

Diff of /trunk/doc/SConscript

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

revision 3629 by gross, Wed Oct 19 03:04:27 2011 UTC revision 3892 by jfenwick, Tue Apr 10 08:57:23 2012 UTC
# Line 14  Line 14 
14  import os  import os
15  Import('*')  Import('*')
16    
17    from subprocess import PIPE, Popen
18    
19  haveMPL=False   # do we have matplotlib?  haveMPL=False   # do we have matplotlib?
20  haveGD=False    # does matplotlib have griddata?  haveGD=False    # does matplotlib have griddata?
21    
22  mplmagicversion='0.98.5'  mplmagicversion='0.98.5'
23    
24  # check for matplotlib  # check for matplotlib
25  try:  if env['pythoncmd']=='python':
26      try:
27      import matplotlib      import matplotlib
28      haveMPL=True      haveMPL=True
29      mplversion=matplotlib.__version__      mplversion=matplotlib.__version__
30      from matplotlib.mlab import griddata      from matplotlib.mlab import griddata
31      haveGD=True      haveGD=True
32  except ImportError:    except ImportError:
33      pass      pass
34    else:
35      # we need to fire up the external command
36        p=Popen([env['pythoncmd'], '-c', 'from __future__ import print_function;import matplotlib;print(matplotlib.__version__);from matplotlib.mlab import griddata;print("1")'], stdout=PIPE)
37        try:
38            mplversion=p.stdout.readline().strip()
39            haveMPL=True
40            hgd=p.stdout.readline().strip()
41            haveGD=True
42        except IOError:
43            pass
44        p.wait()
45    
46  if not haveMPL:  if not haveMPL:
47      print("matplotlib not found, skipping some tests")      print("matplotlib not found, skipping some tests")
# Line 116  sortOutExample('cookbook/example11a.py', Line 130  sortOutExample('cookbook/example11a.py',
130  sortOutExample('cookbook/example11b.py', needsMagicMPL=True, allowsMPI=False)  sortOutExample('cookbook/example11b.py', needsMagicMPL=True, allowsMPI=False)
131    
132  if len(skipped_tests)>0:  if len(skipped_tests)>0:
133      print("gmsh not available. Skipping tests %s."%' '.join(skipped_tests))      print("gmsh not available. Skipping tests %s!"%' '.join(skipped_tests))
134    
135  example_files = example_files_allow_mpi + example_files_no_mpi + example_deps  example_files = example_files_allow_mpi + example_files_no_mpi + example_deps
136    

Legend:
Removed from v.3629  
changed lines
  Added in v.3892

  ViewVC Help
Powered by ViewVC 1.1.26