/[escript]/branches/4.0fordebian/SConstruct
ViewVC logotype

Diff of /branches/4.0fordebian/SConstruct

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

revision 3967 by jfenwick, Mon Sep 17 04:02:58 2012 UTC revision 3975 by caltinay, Thu Sep 20 01:54:06 2012 UTC
# Line 16  EnsurePythonVersion(2,5) Line 16  EnsurePythonVersion(2,5)
16  import sys, os, platform, re  import sys, os, platform, re
17  from distutils import sysconfig  from distutils import sysconfig
18  from site_init import *  from site_init import *
 import subprocess  
19  from subprocess import PIPE, Popen  from subprocess import PIPE, Popen
20    
21  # Version number to check for in options file. Increment when new features are  # Version number to check for in options file. Increment when new features are
# Line 538  env.PrependENVPath(LD_LIBRARY_PATH_KEY, Line 537  env.PrependENVPath(LD_LIBRARY_PATH_KEY,
537    
538  ######## numpy (required)  ######## numpy (required)
539    
540  if env['pythoncmd']=='python':  if not detectModule(env, 'numpy'):
541      try:      print("Cannot import numpy. If it is installed try setting your PYTHONPATH and probably %s"%LD_LIBRARY_PATH_KEY)
542        from numpy import identity      Exit(1)
     except ImportError:  
       print("Cannot import numpy, you need to set your PYTHONPATH and probably %s"%LD_LIBRARY_PATH_KEY)  
       Exit(1)  
 else:  
     p=subprocess.call([env['pythoncmd'],'-c','import numpy'])  
     if p!=0:  
       print("Cannot import numpy, you need to set your PYTHONPATH and probably %s"%LD_LIBRARY_PATH_KEY)  
       Exit(1)  
543    
544  ######## CppUnit (required for tests)  ######## CppUnit (required for tests)
545    
# Line 561  try: Line 552  try:
552  except:  except:
553      env['cppunit']=False      env['cppunit']=False
554    
555    ######## sympy (optional)
556    
557    if detectModule(env, 'sympy'):
558        env['sympy'] = True
559    else:
560        print("Cannot import sympy. Symbolic toolbox and nonlinear PDEs will not be available.")
561        env['sympy'] = False
562    
563  ######## netCDF (optional)  ######## netCDF (optional)
564    
565  netcdf_inc_path=''  netcdf_inc_path=''
# Line 706  if env['parmetis']: Line 705  if env['parmetis']:
705  ######## gmsh (optional, for tests)  ######## gmsh (optional, for tests)
706    
707  try:  try:
708      import subprocess      p=Popen(['gmsh', '-info'], stderr=PIPE)
     p=subprocess.Popen(['gmsh', '-info'], stderr=subprocess.PIPE)  
709      _,e=p.communicate()      _,e=p.communicate()
710      if e.split().count("MPI"):      if e.split().count("MPI"):
711          env['gmsh']='m'          env['gmsh']='m'
# Line 760  else: Line 758  else:
758      print("          LAPACK:  DISABLED")      print("          LAPACK:  DISABLED")
759  d_list=[]  d_list=[]
760  e_list=[]  e_list=[]
761  for i in 'debug','openmp','netcdf','parmetis','papi','mkl','umfpack','boomeramg','silo','visit','vsl_random':  for i in 'debug','openmp','boomeramg','mkl','netcdf','papi','parmetis','silo','sympy','umfpack','visit','vsl_random':
762      if env[i]: e_list.append(i)      if env[i]: e_list.append(i)
763      else: d_list.append(i)      else: d_list.append(i)
764  for i in e_list:  for i in e_list:

Legend:
Removed from v.3967  
changed lines
  Added in v.3975

  ViewVC Help
Powered by ViewVC 1.1.26