Changeset 2517
- Timestamp:
- 05/15/12 15:17:10 (13 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 3 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/SConstruct
r2510 r2517 21 21 pass 22 22 return "" 23 24 def get_libdir(): 25 return os.path.basename(distutils.sysconfig.get_config_var('LIBDIR')) 26 27 LIBDIR = "lib' #get_libdir() 23 28 24 29 EnsureSConsVersion(1,0,0) … … 127 132 else: 128 133 conf.env.AppendUnique(CPPPATH=[conf.env["numpyincdir"]]) 129 # numpy 1.0 uses config.h; numpy >= 1.1 uses numpyconfig.h130 134 if conf.CheckHeader("numpy/numpyconfig.h"): 131 135 conf.env.Append(CPPDEFINES=["-DAIPS_USENUMPY"]) … … 136 140 conf.env.Append(CPPFLAGS=['-DHAVE_LIBPYRAP']) 137 141 142 if not conf.CheckLib("m"): 143 Exit(1) 138 144 # test for cfitsio 139 if not conf.CheckLib("m"): Exit(1)140 145 conf.env.AddCustomPackage('cfitsio') 141 146 libname = conf.env["cfitsiolib"] 142 if libname.find(".") > -1 and os.path.exists(libname): 143 conf.env.AppendUnique(LIBS=[env.File(libname)]) 144 else: 145 if not conf.CheckLibWithHeader(libname, 146 'fitsio.h', language='c'): 147 if not conf.CheckHeader("fitsio.h"): 148 #SuSE is being special 149 conf.env.AppendUnique(CPPPATH=['/usr/include/libcfitsio0']) 150 if not conf.CheckHeader("fitsio.h"): 151 Exit(1) 152 if libname.find(".") > -1 and os.path.exists(libname): 153 conf.env.AppendUnique(LIBS=[env.File(libname)]) 154 else: 155 if not conf.CheckLib(libname, language='c'): 147 156 Exit(1) 148 157 conf.env.AddCustomPackage('wcs') … … 156 165 157 166 conf.env.AddCustomPackage('rpfits') 158 if not conf.CheckLib(conf.env["rpfitslib"], language="c"): 167 if not conf.CheckLibWithHeader(conf.env["rpfitslib"], "RPFITS.h", 168 language="c"): 159 169 Exit(1) 160 170 … … 163 173 pth = os.path.join(p, "include", "casacore") 164 174 if os.path.exists(pth): 165 libpth = os.path.join(p, "lib")175 libpth = os.path.join(p, LIBDIR) 166 176 conf.env.AppendUnique(CPPPATH=[pth]) 167 177 break … … 169 179 "casa_coordinates", "casa_lattices", 170 180 "casa_fits", "casa_measures", "casa_scimath", 171 "casa_scimath_f", "casa_tables", 172 "casa_mirlib", "casa_casa"] 181 "casa_scimath_f", "casa_tables", "casa_casa"] 173 182 if conf.env["casacorestatic"]: 174 183 libs = [ env.File(os.path.join(libpth, "lib"+lib+".a")) \ -
trunk/examples/waterfall.py
r1415 r2517 10 10 scan = scantable("../test/data/tid-t002.rpf", average=False) 11 11 print scan 12 12 13 # select only one IF/Pol/Beam 13 sel = selector() 14 sel.set_ifs(0) 15 sel.set_polarisations(0) 16 sel.set_beams(0) 17 scan.set_selection(sel) 14 scan.set_selection(ifs=0, beams=0, pols=0) 18 15 19 16 # plot in GHz … … 50 47 xyplotter.ylabel("Obs. Time") 51 48 52 #xyplotter.savefig("test.ps",orientation="landscape")49 xyplotter.savefig("test.png",orientation="landscape") -
trunk/scons/utils.py
r1465 r2517 4 4 import re 5 5 import platform 6 7 def get_libdir(): 8 import distutils.sysconfig 9 return os.path.basename(distutils.sysconfig.get_config_var('LIBDIR')) 10 11 LIBDIR = "lib" #get_libdir() 6 12 7 13 def generate(env): … … 33 39 env.Exit(1) 34 40 env.PrependUnique(CPPPATH = [os.path.join(path, "include")]) 35 env.PrependUnique(LIBPATH = [os.path.join(path, "lib")])41 env.PrependUnique(LIBPATH = [os.path.join(path, LIBDIR)]) 36 42 env.AddCustomPath = AddCustomPath 37 43 … … 46 52 if pkgroot is not None: 47 53 incd = os.path.join(pkgroot, "include") 48 libd = os.path.join(pkgroot, "lib")54 libd = os.path.join(pkgroot, LIBDIR) 49 55 else: 50 56 if pkgincd is not None: -
trunk/scons_ext.py
r2515 r2517 19 19 'Prefix for cfitsio installation location'), 20 20 ('cfitsiolib=', None, 'Name of the cfitsio library'), 21 ('cfitsioincdir=', None, 'The custom cfitsio include dir'), 21 22 ('wcsroot=', None, 'Prefix for wcslib installation location'), 22 23 ('wcslib=', None, 'Name of the wcs library'), … … 49 50 self.cfitsioroot = None 50 51 self.cfitsiolib = None 52 self.cfitsioincdir = None 51 53 self.wcsroot = None 52 54 self.wcslib = None … … 60 62 build_ext.build_ext.finalize_options(self) 61 63 for opt in self.user_options: 62 at r = opt[0].strip("=")63 v = getattr(self, at r)64 attr = opt[0].strip("=") 65 v = getattr(self, attr) 64 66 if v is not None: 65 67 if opt[1] is None: 66 self._scons_options.append("=".join([at r, v]))68 self._scons_options.append("=".join([attr, v])) 67 69 else: 68 70 self._scons_options.append(" ".join(["-"+opt[1], v])) … … 79 81 os.makedirs(extdir) 80 82 cmd = ['scons'] + self._scons_options 81 subprocess.call(cmd) 83 retcode = subprocess.call(cmd) 84 if retcode != 0: 85 raise RuntimeError('scons failed') 82 86 # copy extension into distutils build directory 83 87 if os.path.exists("build/_asap.so"): -
trunk/setup.py
r2514 r2517 26 26 license = 'GPL', 27 27 install_requires = ["ipython>=0.11", "matplotlib>=0.99", "numpy>=1.3"], 28 setup_requires = [ "scons>=1.0" ],28 # setup_requires = [ "scons>=1.0" ], 29 29 ext_modules =[ asapso ], 30 30 cmdclass={'build_ext': scons_ext}
Note:
See TracChangeset
for help on using the changeset viewer.