def gen_envs(self, loc): # attempt to use h5pcc to find lib import subprocess try: proc = subprocess.Popen(['h5pcc', '--print-file'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) if proc.wait() == 0: env = self.env.Clone() libdir = proc.communicate()[0].split()[0] libdir = libdir[2:] #Strip -L for env in Package.gen_envs(self, loc): self.headers = ['hdf5.h'] lib_env = env.Clone() lib_env.PrependUnique(LIBS=['hdf5']) lib_env.PrependUnique(LIBPATH=[libdir]) lib_env.PrependUnique(RPATH=[libdir]) #Get include dir lib_env.PrependUnique(CPPPATH=libdir + '/include') yield lib_env else: raise RuntimeError("Error trying to use 'h5pcc'") except: # if error in 'h5pcc --print-file' for env in Package.gen_envs(self, loc): self.headers = ['hdf5.h'] if self.find_libraries(loc[2], 'hdf5'): env.PrependUnique(LIBS=['hdf5']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['gl.h', 'glu.h'] env.PrependUnique(LIBS=['GL', 'GLU']) yield env
def gen_envs(self, loc): #env = self.env.Clone() for env in Package.gen_envs(self, loc): self.headers = ['png.h'] if self.find_libraries(loc[2], 'png'): env.PrependUnique(LIBS=['png']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['Python.h'] if self.find_libraries(loc[2], 'python'): env.PrependUnique(LIBS=['python']) yield env if self.find_libraries(loc[2], 'python3.5m'): env.AppendUnique( CPPPATH=[os.path.join(self.location[1][0], 'python3.5m')]) env.PrependUnique(LIBS=['python3.5m']) yield env if self.find_libraries(loc[2], 'python3.6m'): env.AppendUnique( CPPPATH=[os.path.join(self.location[1][0], 'python3.6m')]) env.PrependUnique(LIBS=['python3.6m']) yield env if self.find_libraries(loc[2], 'python3.7m'): env.AppendUnique( CPPPATH=[os.path.join(self.location[1][0], 'python3.7m')]) env.PrependUnique(LIBS=['python3.7m']) yield env if self.find_libraries(loc[2], 'python3.8'): env.AppendUnique( CPPPATH=[os.path.join(self.location[1][0], 'python3.8')]) env.PrependUnique(LIBS=['python3.8']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = [os.path.join('StGermain', 'StGermain.h'), os.path.join('StgDomain', 'StgDomain.h')] if self.find_libraries(loc[2], 'StgDomain'): env.PrependUnique(LIBS=['StgDomain']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['gl.h'] env.PrependUnique(LIBS=['GL']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): # the following is required to force libxml2 to not use the cpp-api env.AppendUnique(CPPDEFINES=["U_SHOW_CPLUSPLUS_API=0",]) self.headers = [os.path.join('libxml', 'parser.h')] if self.find_libraries(loc[2], 'xml2'): env.PrependUnique(LIBS=['xml2']) yield env
def gen_envs(self, loc): libs = "globus_io_gcc32dbg globus_ftp_control_gcc32dbg globus_ftp_client_gcc32dbg globus_gass_transfer_gcc32dbg globus_wsrf_core_tools_gcc32dbg globus_c_wsrf_resource_gcc32dbg globus_wsa_bindings_gcc32dbg globus_ds_bindings_gcc32dbg globus_wsu_bindings_gcc32dbg globus_wsp_bindings_gcc32dbg globus_wst_bindings_gcc32dbg globus_wsse_bindings_gcc32dbg globus_wsseu_bindings_gcc32dbg globus_wsc_bindings_gcc32dbg globus_wsbf_bindings_gcc32dbg globus_wsnt_bindings_gcc32dbg globus_wsrl_bindings_gcc32dbg globus_wsrp_bindings_gcc32dbg globus_wssg_bindings_gcc32dbg globus_notification_consumer_bindings_gcc32dbg globus_subscription_manager_bindings_gcc32dbg globus_ws_messaging_gcc32dbg globus_usage_gcc32dbg globus_xio_gcc32dbg gssapi_error_gcc32dbg globus_gss_assist_gcc32dbg globus_gssapi_gsi_gcc32dbg globus_gsi_proxy_core_gcc32dbg globus_gsi_credential_gcc32dbg globus_gsi_callback_gcc32dbg globus_oldgaa_gcc32dbg globus_gsi_sysconfig_gcc32dbg globus_gsi_cert_utils_gcc32dbg globus_openssl_gcc32dbg globus_openssl_error_gcc32dbg globus_callout_gcc32dbg globus_proxy_ssl_gcc32dbg globus_common_gcc32dbg ssl_gcc32dbg crypto_gcc32dbg xml2_gcc32dbg ltdl_gcc32dbg" libs = libs.split() for env in Package.gen_envs(self, loc): self.headers = [] if self.find_libraries(loc[2], libs): env.PrependUnique(LIBS=libs) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = [ os.path.join('StGermain', 'StGermain.h'), os.path.join('StgDomain', 'StgDomain.h') ] if self.find_libraries(loc[2], 'StgDomain'): env.PrependUnique(LIBS=['StgDomain']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['gl.h', 'osmesa.h'] if self.find_libraries(loc[2], 'OSMesa'): env.PrependUnique(LIBS=['OSMesa', 'GLU', 'GL']) #OK: Hack to force search for libGL in mesa dirs instead of system paths env.PrependUnique(RPATH=[loc[2][0] + '/mesa', loc[2][0]]) env.PrependUnique(LIBPATH=[loc[2][0] + '/mesa', loc[2][0]]) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): # lets default to clang where on Darwin. Also note the stdlib option, which is required for some business relating to std::strings & c11 if platform.system() == "Darwin": env['CXX'] = 'clang++ -stdlib=libc++' self.headers = ['spatialdata/spatialdb/SimpleDB.hh', 'spatialdata/spatialdb/SimpleDBQuery.hh'] if self.find_libraries(loc[2], 'spatialdata'): env.PrependUnique(LIBS=['spatialdata'] ) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = [os.path.join('StGermain', 'StGermain.h'), os.path.join('StgDomain', 'StgDomain.h'), os.path.join('StgFEM', 'StgFEM.h'), os.path.join('PICellerator', 'PICellerator.h'), os.path.join('Underworld', 'Underworld.h')] if self.find_libraries(loc[2], 'Underworld'): env.PrependUnique(LIBS=['Underworld']) yield env
def gen_envs(self, loc): try: import numpy as np except ImportError: print "Cannot import numpy. Perhaps it is not installed." raise for env in Package.gen_envs(self, loc): self.headers = [self.python.headers[0], 'numpy/arrayobject.h'] env.AppendUnique(CPPPATH=[self.location[1][0]]) yield env
def gen_envs(self, loc): # If we've been given an MPI compiler just try that. if os.path.basename(self.env['CXX']) in ['mpicxx', 'mpic++', 'mpiCC']: yield self.env.Clone() return # If flagged to do so, try standard MPI compilers, unless # we were given other options to use. if self.try_compilers and \ self.get_option('mpi_dir') is None and \ self.get_option('mpi_inc_dir') is None and \ self.get_option('mpi_lib_dir') is None and \ self.get_option('mpi_libs') is None: env = self.env.Clone() env['CXX'] = 'mpicxx' yield env for env in Package.gen_envs(self, loc): # Not sure which extra libraries to check for, so try them all. extra_libs = [[], ['rt'], ['pthread', 'rt'], ['dl'], ['dl', 'rt'], ['dl', 'pthread'], ['dl', 'pthread', 'rt']] for libs in extra_libs: # Check for OpenMPI with nsl and util libs. if self.find_libraries(loc[2], ['open-pal', 'nsl', 'util']): lib_env = env.Clone() lib_env.PrependUnique(LIBS=['mpi', 'open-rte', 'open-pal', 'nsl', 'util'] + libs) yield lib_env # Check for OpenMPI. if self.find_libraries(loc[2], 'open-pal'): lib_env = env.Clone() lib_env.PrependUnique(LIBS=['mpi', 'open-rte', 'open-pal'] + libs) yield lib_env # Check for general MPI. if self.find_libraries(loc[2], 'mpi'): lib_env = env.Clone() lib_env.PrependUnique(LIBS=['mpi'] + libs) yield lib_env # Check for MPICH + pmpich. if self.find_libraries(loc[2], ['mpich', 'pmpich']): lib_env = env.Clone() lib_env.PrependUnique(LIBS=['pmpich', 'mpich'] + libs) yield lib_env # Check for MPICH if self.find_libraries(loc[2], 'mpich'): lib_env = env.Clone() lib_env.PrependUnique(LIBS=['mpich'] + libs) yield lib_env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['gl.h', 'glu.h'] if platform.system() == "Darwin": env.AppendUnique(CPPPATH=['/System/Library/Frameworks/OpenGL.framework/Headers']) env.AppendUnique(FRAMEWORKS=['OpenGL']) else: env.PrependUnique(LIBS=['GL', 'GLU']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ["Xlib.h", "GL/glx.h"] lib_env = env.Clone() lib_env.PrependUnique(LIBS=["X11", "Xmu", "GL"]) yield lib_env lib_env = env.Clone() lib_env.PrependUnique(LIBS=["X11", "Xmu", "GL", "Xau", "Xdmcp"]) yield lib_env lib_env = env.Clone() lib_env.PrependUnique(LIBS=["X11", "Xmu", "GL", "xcb", "xcb-xlib", "Xau", "Xdmcp"]) yield lib_env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['X11/Xlib.h', 'GL/glx.h'] lib_env = env.Clone() lib_env.PrependUnique(LIBS=['X11']) yield lib_env lib_env = env.Clone() lib_env.PrependUnique(LIBS=['X11', 'Xau', 'Xdmcp']) yield lib_env lib_env = env.Clone() lib_env.PrependUnique(LIBS=['X11', 'xcb', 'xcb-xlib', 'Xau', 'Xdmcp']) yield lib_env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): # lets default to clang where on Darwin. Also note the stdlib option, which is required for some business relating to std::strings & c11 if platform.system() == "Darwin": env['CXX'] = 'clang++ -stdlib=libc++' self.headers = [ 'spatialdata/spatialdb/SimpleDB.hh', 'spatialdata/spatialdb/SimpleDBQuery.hh' ] if self.find_libraries(loc[2], 'spatialdata'): env.PrependUnique(LIBS=['spatialdata']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = [os.path.join("glut.h")] if platform.system() == "Darwin": env.AppendUnique(CPPPATH=["/System/Library/Frameworks/GLUT.framework/Headers"]) env.AppendUnique(FRAMEWORKS=["GLUT"]) env.AppendUnique(CPPPATH=["/System/Library/Frameworks/OpenGL.framework/Headers"]) env.AppendUnique(FRAMEWORKS=["OpenGL"]) else: env.PrependUnique(LIBS=["glut"]) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): #SDL conftest won't work on mac with SDL.h, use another header self.headers = ['SDL/SDL_video.h'] if platform.system() == "Darwin": env.PrependUnique(LIBS=['SDL', 'SDLmain']) env.AppendUnique(CPPPATH=['/System/Library/Frameworks/OpenGL.framework/Headers']) env.AppendUnique(FRAMEWORKS=['OpenGL']) env.AppendUnique(FRAMEWORKS=['Cocoa']) else: env.PrependUnique(LIBS=['SDL']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = [ os.path.join('StGermain', 'StGermain.h'), os.path.join('StgDomain', 'StgDomain.h'), os.path.join('StgFEM', 'StgFEM.h'), os.path.join('PICellerator', 'PICellerator.h'), os.path.join('Underworld', 'Underworld.h') ] if self.find_libraries(loc[2], 'Underworld'): env.PrependUnique(LIBS=['Underworld']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['Python.h'] if self.find_libraries(loc[2], 'python'): env.PrependUnique(LIBS=['python']) yield env ver = "python" + get_python_version() for ver in [ver, ver + "m"]: if self.find_libraries(loc[2], ver): env.AppendUnique( CPPPATH=[os.path.join(self.location[1][0], ver)]) env.PrependUnique(LIBS=[ver]) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = [ os.path.join("StGermain", "StGermain.h"), os.path.join("StgDomain", "StgDomain.h"), os.path.join("StgFEM", "StgFEM.h"), os.path.join("PICellerator", "PICellerator.h"), os.path.join("Underworld", "Underworld.h"), os.path.join("Experimental", "Experimental.h"), ] if self.find_libraries(loc[2], "Underworld"): env.PrependUnique(LIBS=["Underworld"]) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['X11/Xlib.h', 'GL/glx.h'] lib_env = env.Clone() lib_env.PrependUnique(LIBS=['X11']) yield lib_env lib_env = env.Clone() lib_env.PrependUnique(LIBS=['X11', 'Xau', 'Xdmcp']) yield lib_env lib_env = env.Clone() lib_env.PrependUnique( LIBS=['X11', 'xcb', 'xcb-xlib', 'Xau', 'Xdmcp']) yield lib_env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['SDL.h'] lib_env = env.Clone() lib_env.PrependUnique(LIBS=['SDL']) yield lib_env lib_env = env.Clone() lib_env.PrependUnique(LIBS=['SDL', 'SDLmain']) yield lib_env if platform.system() == "Darwin": env = self.env.Clone() env.PrependUnique(LIBS=['SDL', 'SDLmain']) env.AppendUnique(CPPPATH=['/System/Library/Frameworks/SDL.framework/Headers']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = [os.path.join('glut.h')] if platform.system() == "Darwin": env.AppendUnique(CPPPATH=[ '/System/Library/Frameworks/GLUT.framework/Headers' ]) env.AppendUnique(FRAMEWORKS=['GLUT']) env.AppendUnique(CPPPATH=[ '/System/Library/Frameworks/OpenGL.framework/Headers' ]) env.AppendUnique(FRAMEWORKS=['OpenGL']) else: env.PrependUnique(LIBS=['glut']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['Python.h'] if self.find_libraries(loc[2], 'python'): env.PrependUnique(LIBS=['python']) yield env if self.find_libraries(loc[2], 'python2.7'): env.AppendUnique(CPPPATH=[os.path.join(self.location[1][0],'python2.7')]) env.PrependUnique(LIBS=['python2.7']) yield env if self.find_libraries(loc[2], 'python2.6'): env.AppendUnique(CPPPATH=[os.path.join(self.location[1][0],'python2.6')]) env.PrependUnique(LIBS=['python2.6']) yield env if self.find_libraries(loc[2], 'python2.5'): env.AppendUnique(CPPPATH=[os.path.join(self.location[1][0],'python2.5')]) env.PrependUnique(LIBS=['python2.5']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['libavcodec/avcodec.h', 'libavformat/avformat.h'] lib_env = env.Clone() lib_env.PrependUnique(LIBS=['avcodec', 'avutil', 'avformat']) yield lib_env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['stdlib.h', 'stdio.h', 'jpeglib.h'] if self.find_libraries(loc[2], 'jpeg'): env.PrependUnique(LIBS=['jpeg']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): env.PrependUnique(LIBS=['tellus']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = [os.path.join('pcu', 'pcu.h')] if self.find_libraries(loc[2], 'pcu'): env.PrependUnique(LIBS=['pcu']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = [self.python.headers[0], 'numpy/arrayobject.h'] env.AppendUnique(CPPPATH=[self.location[1][0]]) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): env.PrependUnique(LIBS=["sedsim"]) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['math.h'] if self.find_libraries(loc[2], 'm'): env.PrependUnique(LIBS=['m']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = [os.path.join('libxml', 'parser.h')] if self.find_libraries(loc[2], 'xml2'): env.PrependUnique(LIBS=['xml2']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ["fame.h"] if self.find_libraries(loc[2], "fame"): env.PrependUnique(LIBS=["fame"]) yield env
def gen_envs(self, loc): # If we've been given an MPI compiler just try that. if os.path.basename(self.env['CC']) in ['mpicc', 'mpicxx']: yield self.env.Clone() return # If flagged to do so, try standard MPI compilers, unless # we were given other options to use. if self.try_compilers and \ self.get_option('mpi_dir') is None and \ self.get_option('mpi_inc_dir') is None and \ self.get_option('mpi_lib_dir') is None and \ self.get_option('mpi_libs') is None: env = self.env.Clone() env['CC'] = 'mpicc' env['CXX'] = 'mpicxx' yield env # attempt to use mpicc to find libs reqired import subprocess # test for open-mpi try: proc = subprocess.Popen(['mpicc', '-showme:libs'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) if proc.wait() == 0: env = self.env.Clone() libs=proc.communicate()[0].split() for env in Package.gen_envs(self, loc): lib_env = env.Clone() lib_env.PrependUnique(LIBS=libs) yield lib_env except OSError: # if error in 'mpicc -showme:libs' import sys #sys.stdout.write("no mpicc here, ") # attempt to find everything from mpicc.conf mpiconf = None if loc[0]: mpiconf = os.path.join( loc[0], 'etc/mpicc.conf' ) if not os.path.exists( mpiconf ): mpiconf = None if mpiconf: # rape and pilage through the mpicc.conf file from distutils import sysconfig vars = {} flags = '' # get a list of all 'variable' names sysconfig.parse_makefile(mpiconf, vars) if 'MPILIBNAME' in vars: flags += vars['MPILIBNAME'] if 'LIBS' in vars: flags += vars['LIBS'] if 'MPI_OTHERLIBS' in vars: flags += vars['MPI_OTHERLIBS'] if flags != []: # format the flags string flags_nice=flags.replace('"', '').replace('-l', ' ').split(' ') # remove empty elements for xxx in reversed(flags_nice): if xxx=='': flags_nice.remove(xxx) for env in Package.gen_envs(self, loc): lib_env = env.Clone() lib_env.PrependUnique(LIBS=flags_nice) yield lib_env for env in Package.gen_envs(self, loc): # Not sure which extra libraries to check for, so try them all. extra_libs = [[], ['rt'], ['pthread', 'rt'], ['dl'], ['dl', 'rt'], ['dl', 'pthread'], ['dl', 'pthread', 'rt']] for libs in extra_libs: # Check for OpenMPI with nsl and util libs. if self.find_libraries(loc[2], ['open-pal', 'nsl', 'util']): lib_env = env.Clone() lib_env.PrependUnique(LIBS=['mpi', 'open-rte', 'open-pal', 'nsl', 'util'] + libs) yield lib_env # Check for OpenMPI. if self.find_libraries(loc[2], 'open-pal'): lib_env = env.Clone() lib_env.PrependUnique(LIBS=['mpi', 'open-rte', 'open-pal'] + libs) yield lib_env # Check for general MPI. if self.find_libraries(loc[2], 'mpi'): lib_env = env.Clone() lib_env.PrependUnique(LIBS=['mpi'] + libs) yield lib_env # Check for MPICH + pmpich. if self.find_libraries(loc[2], ['mpich', 'pmpich']): lib_env = env.Clone() lib_env.PrependUnique(LIBS=['pmpich', 'mpich'] + libs) yield lib_env # Check for MPICH if self.find_libraries(loc[2], 'mpich'): lib_env = env.Clone() lib_env.PrependUnique(LIBS=['mpich'] + libs ) yield lib_env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = [os.path.join('sqlite3.h')] if self.find_libraries(loc[2], 'sqlite3'): env.PrependUnique(LIBS=['sqlite3']) yield env
def gen_envs(self, loc): for env in Package.gen_envs(self, loc): self.headers = ['glu.h', 'osmesa.h'] if self.find_libraries(loc[2], 'OSMesa'): env.PrependUnique(LIBS=['OSMesa', 'GLU']) yield env