Changeset 1181 for trunk


Ignore:
Timestamp:
08/24/06 11:45:27 (18 years ago)
Author:
mar637
Message:

finishing touches to making scons makedist=xyz work

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r1177 r1181  
    66#from installtree import InstallTree
    77
    8 version = "2.1b"
     8version = "2.1.0b"
    99moduledir = distutils.sysconfig.get_python_lib()
    1010if  platform.architecture()[0] == '64bit':
     
    9898stagepys = env.SConscript("python/SConscript")
    9999stage0 = env.Install("stage", "bin/install")
    100 stage1 = env.Install("stage/bin", "bin/asap")
    101 env.Alias('stage', [stagebuild,stagedoc,stagepys, stage0, stage1])
     100stage1 = env.Install("stage/bin", ["bin/asap", "bin/asap_update_data"])
     101stage2 = env.Install("stage/data", "share/ipythonrc-asap")
     102env.Alias('stage', [stagebuild,stagedoc,stagepys, stage0, stage1, stage2])
    102103# install locally
    103104asapmod = env.InstallTree(dest_dir = os.path.join(env["moduledir"], "asap"),
     
    110111if len(env["makedist"]):
    111112    md =env.CreateDist("dist/asap-%s-%s" % (version, env["makedist"]),
    112                    ["install", "README", "CHANGELOG", "asap"],
     113                   ["install", "README", "CHANGELOG", "asap", "data",
     114                    "bin"],
    113115                   "stage")
  • trunk/bin/install

    r1173 r1181  
    1313              [-h] this message
    1414    """
     15
     16def get_libs(lddcommand='/usr/bin/ldd', lib='_asap.so'):
     17    if not os.path.isfile(lddcommand):
     18        raise IOError("ldd not available")
     19    if not os.path.exists(lib):
     20        raise IOError("File %s not found" %lib)
     21    p = os.popen(lddcommand+" "+lib)
     22    resolved = []
     23    unresolved = []
     24    for l in p.readlines():
     25        lsp = l.split()
     26        if lsp[2] == "not":
     27            unresolved.append(lsp[0])
     28        else:
     29            resolved.append(lsp[2])
     30    return resolved, unresolved
    1531
    1632try:
     
    4763        moduledir = v
    4864
    49 print 'Looking for dependent modules...'
     65print "Looking fo all required libraries..."
     66try:
     67    libs, missing = get_libs(lib="asap/_asap.so")
     68    if len(missing):
     69        print " The following libraries are missing:"
     70        print missing
     71        sys.exit(1)
     72    else:
     73        print "   All required libraries are present."
     74except IOError,msg:
     75    print msg+" Skipping test."
     76
     77print 'Looking for dependent python modules...'
    5078try:
    5179    import matplotlib
     
    75103    sys.exit(1)
    76104
    77 print "All required modules were found."
     105print "   All required modules were found."
    78106moddir = os.path.join(moduledir, "asap")
    79107bindir =  os.path.join(execprefix, "bin")
     
    84112    print "Installing asap module in %s" % moddir
    85113    shutil.copytree("asap", moddir)
    86     print "Installing asap startup script in %s" % bindir
     114    print "Installing asap  scripts in %s" % bindir
    87115    shutil.copy2("bin/asap", bindir)
     116    shutil.copy2("bin/asap_update_data", bindir)
    88117    shutil.copytree("data", os.path.join(moddir,"data"))
    89118    print "Installation completed."
  • trunk/doc/README

    r770 r1181  
    1 This is a linux binary distribution of asap.
     1This is a binary distribution of asap.
    22
    33To be able to run the following additional packages need to be installed.
    44
    5 * gcc-3.3, g++-3.3
    6 * python2.3
    7 * boost_python (1.32)
     5* gcc/g++
     6* python
     7* boost_python
     8* cfitsio
    89* lapack
    910* blas
    1011* g2c
    11 * matplotlib (>0.73)
    12 * ipython
     12* matplotlib
     13* numpy or numarray
     14* ipython
    1315
    1416INSTALL
     
    1618
    1719To install simply run (as root or 'sudo')
    18   ./bin/install.sh
    19 which will install asap into /usr/local
     20
     21./install
     22
     23which will install asap into the default location.
     24To do a customised install run
     25
     26./install -h
     27
     28for help.
    2029
    2130
     
    2433
    2534simply type
    26  asap
    27 at the prompt
     35
     36asap
     37
     38at the prompt (if you use tcsh you might need to run 'rehash' first)
Note: See TracChangeset for help on using the changeset viewer.