Changeset 1105 for trunk/SConstruct


Ignore:
Timestamp:
08/03/06 10:21:54 (18 years ago)
Author:
mar637
Message:

more clever use of python...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r1090 r1105  
    1 import os,sys
     1import os, sys, glob
    22import distutils.sysconfig
    33import platform
    44
    55#vars = distutils.sysconfig.get_config_vars()
    6 moduledir = "/tmp/dummy"#distutils.sysconfig.get_python_lib()
     6moduledir = "/opt/lib/python2/"#distutils.sysconfig.get_python_lib()
    77
    88opts = Options("userconfig.py", ARGUMENTS)
    99opts.Add("prefix", "The root installation path", distutils.sysconfig.PREFIX)
    1010opts.Add("moduledir", "The python module path (site-packages))", moduledir)
     11
     12def SGlob(pattern):
     13    path = GetBuildPath('SConscript').replace('SConscript', '')
     14    return [ i.replace(path, '') for i in glob.glob(path + pattern) ]
     15
    1116
    1217def addCasaLibs(env):
     
    1520                tables scimath scimath_f casa wcs".split()
    1621    env.Prepend( LIBS =  casalibs )
     22    casaincd = [os.path.join(env['CASAROOT'], 'code/include'), \
     23                os.path.join(env['CASAROOT'], 'code/casa')]
     24    env.Append( CPPPATH = casaincd )
     25    casalibd = os.path.join(env['CASAROOT'], env['CASAARCH'], 'lib')
     26    env.Append( LIBPATH = [ casalibd ] )
    1727    # Explicit templates in casa
    1828    env.Append( CPPFLAGS = ['-DAIPS_NO_TEMPLATE_SRC'] )
     
    6272    if not conf.CheckLib('rpfits'): Exit(1)
    6373    if not conf.CheckLib('cfitsio'): Exit(1)
    64     if not conf.CheckLib('g2c'): Exit(1)
    6574    if not conf.CheckLib('lapack'): Exit(1)
    6675    if not conf.CheckLib('blas'): Exit(1)
     76    if not conf.CheckLib('g2c'): Exit(1)
    6777    if not conf.CheckLib('stdc++',language='c++'): Exit(1)
    6878    if not conf.CheckCasa(): Exit(1)
     
    7484    env.Append(CPPFLAGS='-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__x86_64__ -DAIPS_64B'.split())
    7585
    76 Export("env")
     86Export("env","SGlob")
    7787so = env.SConscript("src/SConscript", build_dir="build", duplicate=0)
    7888env.Install(moduledir, so )
    79 env.Install(moduledir, ["python/__init__.py"] )
    80 env.Alias('install',moduledir)
     89#pys = env.SConscript("python/SConscript")
     90# env.Install(moduledir, pys)
     91env.Alias('install', moduledir)
Note: See TracChangeset for help on using the changeset viewer.