/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1348 by ksteube, Mon Nov 19 00:21:36 2007 UTC revision 1375 by gross, Wed Jan 9 00:15:05 2008 UTC
# Line 20  import sys, os, re Line 20  import sys, os, re
20  if sys.path.count('scons')==0: sys.path.append('scons')  if sys.path.count('scons')==0: sys.path.append('scons')
21  import scons_extensions  import scons_extensions
22    
23    # We may also need to know where python's site-packages subdirectory lives
24    python_version = 'python%s.%s'%(sys.version_info[0],sys.version_info[1])
25    
26  #===============================================================  #===============================================================
27    
28  tools_prefix="/usr"  tools_prefix="/usr"
# Line 28  tools_prefix="/usr" Line 31  tools_prefix="/usr"
31  #      #    
32  #    get the installation prefix  #    get the installation prefix
33  #  #
34  prefix = ARGUMENTS.get('prefix', '/usr')  prefix = ARGUMENTS.get('prefix', sys.prefix )
35    
36  # We may also need to know where python's site-packages subdirectory lives  # We may also need to know where python's site-packages subdirectory lives
37  python_version = 'python%s.%s'%(sys.version_info[0],sys.version_info[1])  python_version = 'python%s.%s'%(sys.version_info[0],sys.version_info[1])
   
38  # Install as a standard python package in /usr/lib64 if available, else in /usr/lib  # Install as a standard python package in /usr/lib64 if available, else in /usr/lib
39  if os.path.isdir(  prefix+"/lib64/"+python_version+"/site-packages"):  if os.path.isdir(  prefix+"/lib64/"+python_version+"/site-packages"):
40     sys_dir_packages =  prefix+"/lib64/"+python_version+"/site-packages/esys"     sys_dir_packages =  prefix+"/lib64/"+python_version+"/site-packages/esys"
# Line 349  except KeyError: Line 351  except KeyError:
351    
352  try:  try:
353     tmp = os.environ['LD_LIBRARY_PATH']     tmp = os.environ['LD_LIBRARY_PATH']
354       print tmp
355     env['ENV']['LD_LIBRARY_PATH'] = tmp     env['ENV']['LD_LIBRARY_PATH'] = tmp
356  except KeyError:  except KeyError:
357     pass     pass
# Line 484  except: Line 487  except:
487       pass       pass
488    
489  # ============= Remember what options were used in the compile =====================================  # ============= Remember what options were used in the compile =====================================
490  env.Execute("/bin/rm -f " + libinstall + "/Compiled.with.*")  if not IS_WINDOWS_PLATFORM:
491      env.Execute("/bin/rm -f " + libinstall + "/Compiled.with.*")
492  if not useMPI:      env.Execute("/bin/rm -f " + libinstall + "/pythonMPI")    if dodebug:       env.Execute("touch " + libinstall + "/Compiled.with.debug")
493      if useMPI:        env.Execute("touch " + libinstall + "/Compiled.with.mpi")
494  if dodebug:     env.Execute("touch " + libinstall + "/Compiled.with.debug")    if omp_flags != '':   env.Execute("touch " + libinstall + "/Compiled.with.OpenMP")
495  if useMPI:      env.Execute("touch " + libinstall + "/Compiled.with.mpi")    if bounds_check:  env.Execute("touch " + libinstall + "/Compiled.with.bounds_check")
 if omp_flags != '': env.Execute("touch " + libinstall + "/Compiled.with.OpenMP")  
 if bounds_check:    env.Execute("touch " + libinstall + "/Compiled.with.bounds_check")  
496    
497  # ============= set mkl (but only of no MPI) =====================================  # ============= set mkl (but only of no MPI) =====================================
498  if not useMPI:  if not useMPI:
# Line 504  if not useMPI: Line 505  if not useMPI:
505     try:     try:
506        lib_path = env['mkl_lib_path']        lib_path = env['mkl_lib_path']
507        env.Append(LIBPATH = [lib_path,])        env.Append(LIBPATH = [lib_path,])
508          env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
509     except KeyError:     except KeyError:
510        pass        pass
511    
# Line 525  if not useMPI: Line 527  if not useMPI:
527     try:     try:
528        lib_path = env['scsl_lib_path']        lib_path = env['scsl_lib_path']
529        env.Append(LIBPATH = [lib_path,])        env.Append(LIBPATH = [lib_path,])
530          env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
531     except KeyError:     except KeyError:
532        pass        pass
533        
# Line 666  if useNetCDF == 'yes': Line 669  if useNetCDF == 'yes':
669     try:     try:
670        lib_path = env['netCDF_lib_path']        lib_path = env['netCDF_lib_path']
671        env.Append(LIBPATH = [ lib_path, ])        env.Append(LIBPATH = [ lib_path, ])
672          env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
673        if IS_WINDOWS_PLATFORM :        if IS_WINDOWS_PLATFORM :
674           env.PrependENVPath('PATH', lib_path)           env.PrependENVPath('PATH', lib_path)
675     except KeyError:     except KeyError:
# Line 683  except KeyError: Line 687  except KeyError:
687  try:  try:
688     lib_path = env['boost_lib_path']     lib_path = env['boost_lib_path']
689     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
690       env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
691     if IS_WINDOWS_PLATFORM :     if IS_WINDOWS_PLATFORM :
692        env.PrependENVPath('PATH', lib_path)        env.PrependENVPath('PATH', lib_path)
693  except KeyError:  except KeyError:
# Line 699  except KeyError: Line 704  except KeyError:
704     pass     pass
705  try:  try:
706     lib_path = env['python_lib_path']     lib_path = env['python_lib_path']
707       env['ENV']['LD_LIBRARY_PATH']+=":"+lib_path
708     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
709  except KeyError:  except KeyError:
710     pass     pass

Legend:
Removed from v.1348  
changed lines
  Added in v.1375

  ViewVC Help
Powered by ViewVC 1.1.26