本文整理汇总了Python中config.Package.gen_envs方法的典型用法代码示例。如果您正苦于以下问题:Python Package.gen_envs方法的具体用法?Python Package.gen_envs怎么用?Python Package.gen_envs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类config.Package
的用法示例。
在下文中一共展示了Package.gen_envs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例2: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例3: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例4: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例5: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例6: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例7: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例8: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例9: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例10: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例11: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例12: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例13: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例14: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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
示例15: gen_envs
# 需要导入模块: from config import Package [as 别名]
# 或者: from config.Package import gen_envs [as 别名]
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