Commit ffdac635 authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

update config to follow last healpix/healpy install procedure

parent 73fa9e55
......@@ -6,13 +6,11 @@ out = 'build'
def set_options(ctx):
ctx.add_option('--with_healpy', action='store', default='', help='healpy location')
ctx.add_option('--cfitsio_prefix', action='store', default='/usr', help='cfitsio location')
ctx.add_option('--healpix_prefix', action='store', default='/usr/local', help='healpix location')
ctx.add_option('--with_gsl', action='store', default='', help='location of gsl')
ctx.add_option('--with_fftw3', action='store', default='', help='location of fftw3')
ctx.add_option('--with_numpy_core', action='store', default='', help='location of numpy core headers')
ctx.add_option('--with_gsl', action='store', default='/usr', help='location of gsl')
ctx.add_option('--with_fftw3', action='store', default='/usr', help='location of fftw3')
ctx.add_option('--with_numpy_core', action='store', default='/usr/lib64/python2.6/site-packages/numpy/core', help='location of numpy core headers')
ctx.tool_options('compiler_cxx')
ctx.tool_options('python')
......@@ -29,40 +27,21 @@ def configure(ctx):
ctx.check_tool('swig')
ctx.check_tool('compiler_cxx')
print('→ find healpix from healpy')
ctx.env["HEALPIX_EXT_PREFIX"] = str(Options.options.with_healpy)+'/hpbeta/healpy'
print('→ find healpix from healpix_prefix')
ctx.env["HEALPIX_EXT_PREFIX"] = str(Options.options.healpix_prefix)
ctx.env["HEALPIX_EXT_LIB"] = ctx.env["HEALPIX_EXT_PREFIX"]+'/lib'
ctx.env["HEALPIX_EXT_INC"] = ctx.env["HEALPIX_EXT_PREFIX"]+'/include'
try:
ctx.env['CXXFLAGS'].append("-I"+ctx.env["HEALPIX_EXT_INC"])
ctx.check(header_name=['alm.h'],compile_mode='cxx', mandatory=True)
except:
print('→ find healpix from healpix_prefix')
ctx.env["HEALPIX_EXT_PREFIX"] = str(Options.options.healpix_prefix)
ctx.env["HEALPIX_EXT_LIB"] = ctx.env["HEALPIX_EXT_PREFIX"]+'/lib'
ctx.env["HEALPIX_EXT_INC"] = ctx.env["HEALPIX_EXT_PREFIX"]+'/include'
ctx.env['CXXFLAGS'].append("-I"+ctx.env["HEALPIX_EXT_INC"])
ctx.check(header_name=['alm.h'],compile_mode='cxx', mandatory=True)
print('→ find cfitsio from healpy')
ctx.env["CFITSIO_PREFIX"] = str(Options.options.with_healpy)+'/hpbeta/healpy'
ctx.env["HEALPIX_EXT_INC"] = ctx.env["HEALPIX_EXT_PREFIX"]+'/include'
ctx.env['CXXFLAGS'].append("-I"+ctx.env["HEALPIX_EXT_INC"])
ctx.check(header_name=['alm.h'],compile_mode='cxx', mandatory=True)
ctx.check_cxx(lib=['cxxsupport', 'fftpack', 'healpix_cxx','sharp','c_utils'],libpath=ctx.env["HEALPIX_EXT_LIB"], uselib_store='healpix',mandatory=True)
print('→ find cfitsio from cfitsio_prefix')
ctx.env["CFITSIO_PREFIX"] = str(Options.options.cfitsio_prefix)
ctx.env["CFITSIO_EXT_LIB"] = ctx.env["CFITSIO_PREFIX"]+'/lib'
ctx.env["CFITSIO_EXT_INC"] = ctx.env["CFITSIO_PREFIX"]+'/include'
try:
ctx.env['CXXFLAGS'].append("-I"+ctx.env["CFITSIO_EXT_INC"])
ctx.check(header_name=['fitsio.h'],compile_mode='cxx', mandatory=True)
except:
print('→ find cfitsio from cfitsio_prefix')
ctx.env["CFITSIO_PREFIX"] = str(Options.options.cfitsio_prefix)
ctx.env["CFITSIO_EXT_LIB"] = ctx.env["CFITSIO_PREFIX"]+'/lib'
ctx.env["CFITSIO_EXT_INC"] = ctx.env["CFITSIO_PREFIX"]+'/include'
ctx.env['CXXFLAGS'].append("-I"+ctx.env["CFITSIO_EXT_INC"])
ctx.check(header_name=['fitsio.h'],compile_mode='cxx', mandatory=True)
ctx.env["HEALPIX_TARGET"] = "healpy"
ctx.env["CFITSIO_EXT_INC"] = ctx.env["CFITSIO_PREFIX"]+'/include/cfitsio'
ctx.env['CXXFLAGS'].append("-I"+ctx.env["CFITSIO_EXT_INC"])
ctx.check(header_name=['fitsio.h'],compile_mode='cxx', mandatory=True)
ctx.check_cxx(lib=['cfitsio'], libpath=ctx.env["CFITSIO_EXT_LIB"], uselib_store='cfitsio', mandatory=True)
ctx.check_cxx(lib=['cxxsupport', 'fftpack', 'healpix_cxx','psht','c_utils'],libpath=ctx.env["HEALPIX_EXT_LIB"], uselib_store='healpix',mandatory=True)
ctx.env['CXXFLAGS'].append("-I"+str(Options.options.with_gsl)+"/include")
ctx.env['CXXFLAGS'].append("-I"+str(Options.options.with_fftw3)+"/include")
......@@ -76,7 +55,7 @@ def configure(ctx):
ctx.check_cxx(lib=['gsl', 'gslcblas'], libpath=str(Options.options.with_gsl)+"/lib", uselib_store='gsl', mandatory=True)
ctx.check_cxx(lib=['fftw3'], libpath=str(Options.options.with_fftw3)+"/lib", uselib_store='fftw3', mandatory=True)
ctx.check_python_module('healpy')
#ctx.find_file('numpy/arrayobject.h', mandatory=True)
def get_version():
return VERSION
......@@ -85,11 +64,10 @@ def build(bld):
print('→ building spherelib')
hp_data = 'HEALPIXDATA="'+bld.env["HEALPIX_EXT_PREFIX"]+'/data"'
libs = ['gsl', 'gslcblas']
libs = ['cfitsio', 'gsl', 'gslcblas']
import Options
import os
libs.append('gomp' )
#libs.append('iomp5')
libs.append('pthread')
target=bld.env["HEALPIX_TARGET"]
......@@ -105,7 +83,7 @@ def build(bld):
lib = libs,
uselib = libs,
libpath = [bld.env["HEALPIX_EXT_LIB"],bld.env["CFITSIO_EXT_LIB"]],
staticlib = [ 'cxxsupport', 'cfitsio', 'fftpack', 'healpix_cxx','psht','c_utils' ],
staticlib = [ 'cxxsupport', 'fftpack', 'healpix_cxx','sharp','c_utils' ],
name = 'spherelib'
)
cxx_spherelib.install_path = '${PREFIX}/lib'
......@@ -121,7 +99,7 @@ def build(bld):
lib = libs+['fftw3', 'm'],
uselib = libs+['fftw3', 'm'],
libpath = [bld.env["HEALPIX_EXT_LIB"],bld.env["CFITSIO_EXT_LIB"]],
staticlib = [ 'cxxsupport','cfitsio', 'fftpack', 'healpix_cxx','psht','c_utils'],
staticlib = [ 'cxxsupport', 'fftpack', 'healpix_cxx','sharp','c_utils'],
name = 'libatlas'
)
cxx_atlas.install_path = '${PREFIX}/lib'
......@@ -137,7 +115,7 @@ def build(bld):
defines = [hp_data],
lib = libs,
libpath = [bld.env["HEALPIX_EXT_LIB"],bld.env["CFITSIO_EXT_LIB"]],
staticlib = ['cxxsupport', 'cfitsio', 'fftpack', 'healpix_cxx','psht','c_utils'],
staticlib = ['cxxsupport', 'fftpack', 'healpix_cxx','sharp','c_utils'],
uselib_local = ['spherelib', 'libatlas']
)
......@@ -151,7 +129,7 @@ def build(bld):
defines = [hp_data],
lib = libs,
libpath = [bld.env["HEALPIX_EXT_LIB"],bld.env["CFITSIO_EXT_LIB"]],
staticlib = ['cxxsupport', 'cfitsio', 'fftpack', 'healpix_cxx','psht','c_utils'],
staticlib = ['cxxsupport', 'fftpack', 'healpix_cxx','sharp','c_utils'],
uselib_local = 'spherelib')
swig_spherelib_bin = bld(
......@@ -164,17 +142,14 @@ def build(bld):
defines = [hp_data],
lib = libs,
libpath = [bld.env["HEALPIX_EXT_LIB"],bld.env["CFITSIO_EXT_LIB"]],
staticlib = ['cxxsupport', 'cfitsio', 'fftpack', 'healpix_cxx','psht','c_utils'],
staticlib = ['cxxsupport', 'fftpack', 'healpix_cxx','sharp','c_utils'],
uselib_local = 'spherelib')
swig_spherelib_map.install_path = '${PYTHONDIR}/spherelib'
swig_spherelib_alm.install_path = '${PYTHONDIR}/spherelib'
swig_spherelib_bin.install_path = '${PYTHONDIR}/spherelib'
obj = bld(features = 'py')
print out
obj.find_sources_in_dirs( ['./spherelib', out+'/default/spherelib'], exts=['.py'] )
obj.find_sources_in_dirs( [out+'/default/spherelib'], exts=['.py'] )
obj.install_path = '${PYTHONDIR}/spherelib'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment