Changeset 1105
- Timestamp:
- 08/03/06 10:21:54 (18 years ago)
- Location:
- trunk
- Files:
-
- 2 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) -
trunk/src/SConscript
r1090 r1105 2 2 3 3 # import root environment 4 Import( "env" )4 Import( "env", "SGlob" ) 5 5 myenv = env.Copy() 6 6 7 # casa includes8 casaincd = [os.path.join(myenv['CASAROOT'], 'code/include'), \9 os.path.join(myenv['CASAROOT'], 'code/casa')]10 7 11 myenv.Append( CPPPATH = casaincd ) 12 13 # libaries and objects 14 # myabe use glob here 15 # ASAP 16 cpps = """ 17 Logger.cpp 18 MathUtils.cpp 19 MathUtils2.cpp 20 RowAccumulator.cpp 21 STAsciiWriter.cpp 22 STAttr.cpp 23 STFiller.cpp 24 STFit.cpp 25 STFitEntry.cpp 26 STFitter.cpp 27 STFocus.cpp 28 STFrequencies.cpp 29 STHeader.cpp 30 STHistory.cpp 31 STLineFinder.cpp 32 STMath.cpp 33 STMolecules.cpp 34 STPol.cpp 35 STPolLinear.cpp 36 STPolStokes.cpp 37 STSelector.cpp 38 STSubTable.cpp 39 STTcal.cpp 40 STWeather.cpp 41 STWriter.cpp 42 Scantable.cpp 43 Templates.cpp 44 """.split() 45 46 pycpps = """ 47 python_Fitter.cpp 48 python_Logger.cpp 49 python_STFiller.cpp 50 python_STFitEntry.cpp 51 python_STLineFinder.cpp 52 python_STMath.cpp 53 python_STSelector.cpp 54 python_STWriter.cpp 55 python_Scantable.cpp 56 python_asap.cpp 57 """.split() 58 59 60 # OTHER 61 #genlibs = """ 62 #g2c stdc++ lapack blas 63 #""".split() 64 65 #myenv.Append( LIBS = ['cfitsio_lfs'] ) 66 #myenv.Append( LIBS = genlibs ) 67 8 cpps = SGlob("*.cpp") 9 pycpps = SGlob("python_*.cpp") 10 for pf in pycpps: cpps.remove(pf) 11 print cpps 68 12 69 13 casalibd = os.path.join(myenv['CASAROOT'],myenv['CASAARCH'],'lib') 14 70 15 # location of libcasav.a 71 myenv. Append( LIBPATH = ['#/build', casalibd] )16 myenv.Prepend( LIBPATH = ['#/build'] ) 72 17 myenv.Install('#build', os.path.join(casalibd, 'libwcs.a')) 73 18 myenv['SHLIBPREFIX']="" #gets rid of lib prefix
Note:
See TracChangeset
for help on using the changeset viewer.