/[escript]/branches/escript3047_with_pastix2995/SConstruct
ViewVC logotype

Diff of /branches/escript3047_with_pastix2995/SConstruct

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

revision 1216 by ksteube, Thu Jul 12 06:20:08 2007 UTC revision 1217 by ksteube, Wed Jul 18 00:47:01 2007 UTC
# Line 36  else: Line 36  else:
36  #    get the installation prefix  #    get the installation prefix
37  #  #
38  prefix = ARGUMENTS.get('prefix', Dir('#.').abspath)  prefix = ARGUMENTS.get('prefix', Dir('#.').abspath)
39    
40    # We may also need to know where python's site-packages subdirectory lives
41    python_version = 'python%s.%s'%(sys.version_info[0],sys.version_info[1])
42    
43    if prefix == "/usr":
44       # Install as a standard python package in /usr/lib64 if available, else in /usr/lib
45       if os.path.isdir(  prefix+"/lib64/"+python_version+"/site-packages"):
46          dir_packages =  prefix+"/lib64/"+python_version+"/site-packages"
47          dir_libraries = prefix+"/lib64"
48       elif os.path.isdir(prefix+"/lib/"+python_version+"/site-packages"):
49          dir_packages =  prefix+"/lib/"+python_version+"/site-packages"
50          dir_libraries = prefix+"/lib"
51       else:
52          print "Install prefix is /usr but couldn't find python package directory in either"
53          print "/usr/lib64/"+python_version+"/site-packages or /usr/lib/"+python_version+"/site-packages"
54          sys.exit(1)
55       dir_examples = prefix+"/share/doc/esys"
56    else:
57       # Install using the usual escript directory structure
58       dir_packages = prefix
59       dir_libraries = prefix+"/lib"
60       dir_examples = prefix
61    dir_packages += "/esys"
62    dir_examples += "/examples"
63    
64  print "Install prefix is: ", prefix  print "Install prefix is: ", prefix
65    print " python packages will be installed in:   ", dir_packages
66    print " libraries will be installed in:     ", dir_libraries
67    print " examples will be installed in:      ", dir_examples
68    
69    #==============================================================================================    
70    
71  # Default options and options help text  # Default options and options help text
72  # These are defaults and can be overridden using command line arguments or an options file.  # These are defaults and can be overridden using command line arguments or an options file.
# Line 174  else: Line 204  else:
204  # DO NOT CHANGE THEM HERE  # DO NOT CHANGE THEM HERE
205  opts.AddOptions(  opts.AddOptions(
206  # Where to install esys stuff  # Where to install esys stuff
207    ('incinstall', 'where the esys headers will be installed', prefix+'/include'),    ('incinstall', 'where the esys headers will be installed',             Dir('#.').abspath+'/include'),
208    ('libinstall', 'where the esys libraries will be installed', prefix+'/lib'),    ('libinstall', 'where the esys libraries will be installed',           dir_libraries),
209    ('pyinstall', 'where the esys python modules will be installed', prefix),    ('pyinstall', 'where the esys python modules will be installed',       dir_packages),
210    ('src_zipfile', 'the source zip file will be installed.', prefix+"/release/escript_src.zip"),    ('exinstall', 'where the esys examples will be installed',             dir_examples),
211    ('test_zipfile', 'the test zip file will be installed.', prefix+"/release/escript_tests.zip"),    ('src_zipfile', 'the source zip file will be installed.',              Dir('#.').abspath+"/release/escript_src.zip"),
212    ('src_tarfile', 'the source tar file will be installed.', prefix+"/release/escript_src.tar.gz"),    ('test_zipfile', 'the test zip file will be installed.',               Dir('#.').abspath+"/release/escript_tests.zip"),
213    ('test_tarfile', 'the test tar file will be installed.', prefix+"/release/escript_tests.tar.gz"),    ('src_tarfile', 'the source tar file will be installed.',              Dir('#.').abspath+"/release/escript_src.tar.gz"),
214    ('examples_tarfile', 'the examples tar file will be installed.', prefix+"/release/doc/escript_examples.tar.gz"),    ('test_tarfile', 'the test tar file will be installed.',               Dir('#.').abspath+"/release/escript_tests.tar.gz"),
215    ('examples_zipfile', 'the examples zip file will be installed.', prefix+"/release/doc/escript_examples.zip"),    ('examples_tarfile', 'the examples tar file will be installed.',       Dir('#.').abspath+"/release/doc/escript_examples.tar.gz"),
216    ('guide_pdf', 'name of the user guide in pdf format', prefix+"/release/doc/user/guide.pdf"),    ('examples_zipfile', 'the examples zip file will be installed.',       Dir('#.').abspath+"/release/doc/escript_examples.zip"),
217    ('api_epydoc', 'name of the epydoc api docs directory',prefix+"/release/doc/epydoc"),    ('guide_pdf', 'name of the user guide in pdf format',                  Dir('#.').abspath+"/release/doc/user/guide.pdf"),
218      ('api_epydoc', 'name of the epydoc api docs directory',                Dir('#.').abspath+"/release/doc/epydoc"),
219      ('guide_html', 'name of the directory for user guide in html format',  Dir('#.').abspath+"/release/doc/user/html"),
220    ('api_doxygen', 'name of the doxygen api docs directory',prefix+"/release/doc/doxygen"),    ('api_doxygen', 'name of the doxygen api docs directory',prefix+"/release/doc/doxygen"),
   ('guide_html', 'name of the directory for user guide in html format', prefix+"/release/doc/user/html"),  
221  # Compilation options  # Compilation options
222    BoolOption('dodebug', 'Do you want a debug build?', 'no'),    BoolOption('dodebug', 'Do you want a debug build?', 'no'),
223    ('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/<hostname>_options.py)", options_file),    ('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/<hostname>_options.py)", options_file),
# Line 328  try: Line 359  try:
359  except KeyError:  except KeyError:
360     libinstall = None     libinstall = None
361  try:  try:
362     pyinstall = env['pyinstall']+'/esys' # all targets will install into pyinstall/esys but PYTHONPATH points at straight pyinstall so you go import esys.escript etc     pyinstall = env['pyinstall'] # all targets will install into pyinstall/esys but PYTHONPATH points at straight pyinstall so you go import esys.escript etc
363     env.PrependENVPath('PYTHONPATH', env['pyinstall'])     env.PrependENVPath('PYTHONPATH', env['pyinstall'])
364  except KeyError:  except KeyError:
365     pyinstall = None     pyinstall = None
366  try:  try:
367       exinstall = env['exinstall']
368    except KeyError:
369       exinstall = None
370    try:
371     dodebug = env['dodebug']     dodebug = env['dodebug']
372  except KeyError:  except KeyError:
373     dodebug = None     dodebug = None
# Line 652  except KeyError: Line 687  except KeyError:
687  env.Default(libinstall)  env.Default(libinstall)
688  env.Default(incinstall)  env.Default(incinstall)
689  env.Default(pyinstall)  env.Default(pyinstall)
690    ### env.Default(exinstall) # ksteube this causes dependency error
691  env.Alias('release_src',[ src_zipfile, src_tarfile ])  env.Alias('release_src',[ src_zipfile, src_tarfile ])
692  env.Alias('release_tests',[ test_zipfile, test_tarfile])  env.Alias('release_tests',[ test_zipfile, test_tarfile])
693  env.Alias('release_examples',[ examples_zipfile, examples_tarfile])  env.Alias('release_examples',[ examples_zipfile, examples_tarfile])
# Line 675  init_target = env.Command(pyinstall+'/__ Line 711  init_target = env.Command(pyinstall+'/__
711  env.Alias(init_target)  env.Alias(init_target)
712    
713  # Allow sconscripts to see the env  # Allow sconscripts to see the env
714  Export(["IS_WINDOWS_PLATFORM", "env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs", "netCDF_libs", "useNetCDF",  Export(["IS_WINDOWS_PLATFORM", "env", "incinstall", "libinstall", "pyinstall", "exinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs", "amd_libs", "blas_libs", "netCDF_libs", "useNetCDF",
715      "boost_libs", "python_libs", "doxygen_path", "epydoc_path", "papi_libs",      "boost_libs", "python_libs", "doxygen_path", "epydoc_path", "papi_libs",
716          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile",          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile",
717          "guide_pdf", "guide_html_index", "api_epydoc", "api_doxygen", "useMPI" ])          "guide_pdf", "guide_html_index", "api_epydoc", "api_doxygen", "useMPI" ])

Legend:
Removed from v.1216  
changed lines
  Added in v.1217

  ViewVC Help
Powered by ViewVC 1.1.26