Changeset 1105 for trunk/SConstruct
- Timestamp:
- 08/03/06 10:21:54 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SConstruct
r1090 r1105 1 import os, sys1 import os, sys, glob 2 2 import distutils.sysconfig 3 3 import platform 4 4 5 5 #vars = distutils.sysconfig.get_config_vars() 6 moduledir = "/ tmp/dummy"#distutils.sysconfig.get_python_lib()6 moduledir = "/opt/lib/python2/"#distutils.sysconfig.get_python_lib() 7 7 8 8 opts = Options("userconfig.py", ARGUMENTS) 9 9 opts.Add("prefix", "The root installation path", distutils.sysconfig.PREFIX) 10 10 opts.Add("moduledir", "The python module path (site-packages))", moduledir) 11 12 def SGlob(pattern): 13 path = GetBuildPath('SConscript').replace('SConscript', '') 14 return [ i.replace(path, '') for i in glob.glob(path + pattern) ] 15 11 16 12 17 def addCasaLibs(env): … … 15 20 tables scimath scimath_f casa wcs".split() 16 21 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 ] ) 17 27 # Explicit templates in casa 18 28 env.Append( CPPFLAGS = ['-DAIPS_NO_TEMPLATE_SRC'] ) … … 62 72 if not conf.CheckLib('rpfits'): Exit(1) 63 73 if not conf.CheckLib('cfitsio'): Exit(1) 64 if not conf.CheckLib('g2c'): Exit(1)65 74 if not conf.CheckLib('lapack'): Exit(1) 66 75 if not conf.CheckLib('blas'): Exit(1) 76 if not conf.CheckLib('g2c'): Exit(1) 67 77 if not conf.CheckLib('stdc++',language='c++'): Exit(1) 68 78 if not conf.CheckCasa(): Exit(1) … … 74 84 env.Append(CPPFLAGS='-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D__x86_64__ -DAIPS_64B'.split()) 75 85 76 Export("env" )86 Export("env","SGlob") 77 87 so = env.SConscript("src/SConscript", build_dir="build", duplicate=0) 78 88 env.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) 91 env.Alias('install', moduledir)
Note:
See TracChangeset
for help on using the changeset viewer.