def CheckGeoTIFF(): geotiff_hdirs=cfg.get_dir('geotiff','hdirs')+cfg.get_dir('General','system_hdirs') geotiff_ldirs=cfg.get_dir('geotiff','ldirs')+cfg.get_dir('General','system_ldirs') geotiff_hdirs = geotiff_hdirs+[os.path.join(x,'geotiff') for x in geotiff_hdirs] geotiff_libs=cfg.get_lib('geotiff','libraries') return GenerateLibCheck('Geotiff',['xtiffio.h'], geotiff_libs, geotiff_hdirs,geotiff_ldirs,'C++')
def CheckPython(): python_hdirs=cfg.get_dir('Python','hdirs')+cfg.get_dir('General','system_hdirs') python_ldirs=cfg.get_dir('Python','ldirs')+cfg.get_dir('General','system_ldirs') python_libs=cfg.get_lib('Python','libraries') python_hdirs.extend([distutils.sysconfig.get_python_inc()]) return GenerateLibCheck('Python',['pyconfig.h'], python_libs,python_hdirs,python_ldirs)
def CheckTBB(): ''' Intel Threading Building Blocks ''' tbb_hdirs=cfg.get_dir('tbb','hdirs')+cfg.get_dir('General','system_hdirs') tbb_ldirs=cfg.get_dir('tbb','ldirs')+cfg.get_dir('General','system_ldirs') tbb_libs=['tbb'] #cfg.get_lib('tbb','libraries').strip().split() return GenerateLibCheck('TBB',['tbb/parallel_for.h'],tbb_libs, tbb_hdirs,tbb_ldirs,'C++')
def CheckNumpy(): # Numpy sometimes has headers in /usr/include, but they can be under site-packages # or even in an Extras directory on some distributions. Ask numpy where it is. # Don't assume the python running scons is the same as what we want for the build. python_hdirs=cfg.get_dir('Python','hdirs')+cfg.get_dir('General','system_hdirs') python_ldirs=cfg.get_dir('Python','ldirs')+cfg.get_dir('General','system_ldirs') np_str='import os.path,numpy;print os.path.join(os.path.split(numpy.__file__)[0],"core","include")' np_inc=subprocess.check_output([cfg.get('Python','exe'),'-c',np_str]).strip() if not os.path.exists(np_inc): logger.error('The Python numpy header directory doesn\'t exist.') else: python_hdirs.append(np_inc) logger.debug('Looking for numpy include numpy/arrayobject.h in %s' % np_inc) return GenerateLibCheck('numpy',['pyconfig.h','Python.h','numpy/arrayobject.h'], None,python_hdirs,python_ldirs)
def CheckBoostPython(): boost_hdirs=cfg.get_dir('Boost','hdirs')+cfg.get_dir('General','system_hdirs') boost_ldirs=cfg.get_dir('Boost','ldirs')+cfg.get_dir('General','system_ldirs') return GenerateLibCheck('BoostPython',['boost/python.hpp'], [['boost_python',None]],boost_hdirs,boost_ldirs)
def CheckBoost(boost_libs): boost_hdirs=cfg.get_dir('Boost','hdirs')+cfg.get_dir('General','system_hdirs') boost_ldirs=cfg.get_dir('Boost','ldirs')+cfg.get_dir('General','system_ldirs') return GenerateLibCheck('Boost',['boost/mpl/list.hpp','boost/chrono.hpp'], boost_libs,boost_hdirs,boost_ldirs)