当前位置: 首页>>代码示例>>Python>>正文


Python conf.load函数代码示例

本文整理汇总了Python中waflib.Configure.conf.load函数的典型用法代码示例。如果您正苦于以下问题:Python load函数的具体用法?Python load怎么用?Python load使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了load函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: cxx_load_tools

def cxx_load_tools(conf):
	"""
	Loads the Waf c++ extensions
	"""
	if not conf.env.DEST_OS:
		conf.env.DEST_OS = Utils.unversioned_sys_platform()
	conf.load('cxx')
开发者ID:blablack,项目名称:ams-lv2,代码行数:7,代码来源:c_config.py

示例2: find_msvc

def find_msvc(conf):
	if sys.platform=='cygwin':
		conf.fatal('MSVC module does not work under cygwin Python!')
	v=conf.env
	path=v['PATH']
	compiler=v['MSVC_COMPILER']
	version=v['MSVC_VERSION']
	compiler_name,linker_name,lib_name=_get_prog_names(conf,compiler)
	v.MSVC_MANIFEST=(compiler=='msvc'and version>=8)or(compiler=='wsdk'and version>=6)or(compiler=='intel'and version>=11)
	cxx=conf.find_program(compiler_name,var='CXX',path_list=path)
	env=dict(conf.environ)
	if path:env.update(PATH=';'.join(path))
	if not conf.cmd_and_log(cxx+['/nologo','/help'],env=env):
		conf.fatal('the msvc compiler could not be identified')
	v['CC']=v['CXX']=cxx
	v['CC_NAME']=v['CXX_NAME']='msvc'
	if not v['LINK_CXX']:
		link=conf.find_program(linker_name,path_list=path)
		if link:v['LINK_CXX']=link
		else:conf.fatal('%s was not found (linker)'%linker_name)
		v['LINK']=link
	if not v['LINK_CC']:
		v['LINK_CC']=v['LINK_CXX']
	if not v['AR']:
		stliblink=conf.find_program(lib_name,path_list=path,var='AR')
		if not stliblink:return
		v['ARFLAGS']=['/NOLOGO']
	if v.MSVC_MANIFEST:
		conf.find_program('MT',path_list=path,var='MT')
		v['MTFLAGS']=['/NOLOGO']
	try:
		conf.load('winres')
	except Errors.WafError:
		warn('Resource compiler not found. Compiling resource file is disabled')
开发者ID:guysherman,项目名称:basic-cpp-template,代码行数:34,代码来源:msvc.py

示例3: find_msvc

def find_msvc(conf):
	if sys.platform=='cygwin':
		conf.fatal('MSVC module does not work under cygwin Python!')
	v=conf.env
	path=v.PATH
	compiler=v.MSVC_COMPILER
	version=v.MSVC_VERSION
	compiler_name,linker_name,lib_name=_get_prog_names(conf,compiler)
	v.MSVC_MANIFEST=(compiler=='msvc'and version>=8)or(compiler=='wsdk'and version>=6)or(compiler=='intel'and version>=11)
	cxx=conf.find_program(compiler_name,var='CXX',path_list=path)
	env=dict(conf.environ)
	if path:env.update(PATH=';'.join(path))
	if not conf.cmd_and_log(cxx+['/nologo','/help'],env=env):
		conf.fatal('the msvc compiler could not be identified')
	v.CC=v.CXX=cxx
	v.CC_NAME=v.CXX_NAME='msvc'
	if not v.LINK_CXX:
		v.LINK_CXX=conf.find_program(linker_name,path_list=path,errmsg='%s was not found (linker)'%linker_name)
	if not v.LINK_CC:
		v.LINK_CC=v.LINK_CXX
	if not v.AR:
		stliblink=conf.find_program(lib_name,path_list=path,var='AR')
		if not stliblink:
			return
		v.ARFLAGS=['/nologo']
	if v.MSVC_MANIFEST:
		conf.find_program('MT',path_list=path,var='MT')
		v.MTFLAGS=['/nologo']
	try:
		conf.load('winres')
	except Errors.ConfigurationError:
		Logs.warn('Resource compiler not found. Compiling resource file is disabled')
开发者ID:allencubie,项目名称:lib,代码行数:32,代码来源:msvc.py

示例4: cc_load_tools

def cc_load_tools(conf):
	"""
	Load the c tool
	"""
	if not conf.env.DEST_OS:
		conf.env.DEST_OS = Utils.unversioned_sys_platform()
	conf.load('c')
开发者ID:GrahamDennis,项目名称:xpdeint,代码行数:7,代码来源:c_config.py

示例5: find_ifort_win32

def find_ifort_win32(conf):
	v=conf.env
	path=v.PATH
	compiler=v.MSVC_COMPILER
	version=v.MSVC_VERSION
	compiler_name,linker_name,lib_name=_get_prog_names(conf,compiler)
	v.IFORT_MANIFEST=(compiler=='intel'and version>=11)
	fc=conf.find_program(compiler_name,var='FC',path_list=path)
	env=dict(conf.environ)
	if path:env.update(PATH=';'.join(path))
	if not conf.cmd_and_log(fc+['/nologo','/help'],env=env):
		conf.fatal('not intel fortran compiler could not be identified')
	v.FC_NAME='IFORT'
	if not v.LINK_FC:
		conf.find_program(linker_name,var='LINK_FC',path_list=path,mandatory=True)
	if not v.AR:
		conf.find_program(lib_name,path_list=path,var='AR',mandatory=True)
		v.ARFLAGS=['/nologo']
	if v.IFORT_MANIFEST:
		conf.find_program('MT',path_list=path,var='MT')
		v.MTFLAGS=['/nologo']
	try:
		conf.load('winres')
	except Errors.WafError:
		Logs.warn('Resource compiler not found. Compiling resource file is disabled')
开发者ID:Gnurou,项目名称:glmark2,代码行数:25,代码来源:ifort.py

示例6: configure

def configure(conf):
	conf.find_dmd()
	conf.load('ar')
	conf.load('d')
	conf.common_flags_dmd()
	conf.d_platform_flags()
	if str(conf.env.D).find('ldc')>-1:
		conf.common_flags_ldc()
开发者ID:HariKishan8,项目名称:Networks,代码行数:8,代码来源:dmd.py

示例7: configure

def configure(conf):
    conf.find_dmd()
    conf.load("ar")
    conf.load("d")
    conf.common_flags_dmd()
    conf.d_platform_flags()
    if str(conf.env.D).find("ldc") > -1:
        conf.common_flags_ldc()
开发者ID:RunarFreyr,项目名称:waz,代码行数:8,代码来源:dmd.py

示例8: configure

def configure(conf):
    conf.find_arm_none_eabi_gxx()
    conf.load('arm-none-eabi-ar', tooldir=os.path.dirname(os.path.realpath(__file__)))
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cxx_load_tools()
    conf.cxx_add_flags()
    conf.link_add_flags()
开发者ID:dale-stewart,项目名称:stm32f0-discovery-basic-template,代码行数:8,代码来源:arm-none-eabi-cxx.py

示例9: configure

def configure(conf):
	conf.find_android_gcc()
	conf.load('android-ar', tooldir="waf-tools")
	conf.gcc_common_flags()
	conf.android_gcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
开发者ID:pixpil,项目名称:gii,代码行数:8,代码来源:android-gcc.py

示例10: configure

def configure(conf):
	conf.find_emcc()
	conf.load('emar', tooldir="waf-tools")
	conf.emcc_common_flags()
	conf.emcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
开发者ID:pixpil,项目名称:gii,代码行数:8,代码来源:emcc.py

示例11: configure

def configure(conf):
	"""
	Configuration for *ldc2*
	"""
	conf.find_ldc2()
	conf.load('ar')
	conf.load('d')
	conf.common_flags_ldc2()
	conf.d_platform_flags()
开发者ID:ArduPilot,项目名称:waf,代码行数:9,代码来源:ldc2.py

示例12: load_external_tool

def load_external_tool(conf, category, name):

    if not conf.has_dependency_path('waf-tools'):
        conf.fatal(load_error)

    # Get the path and load the tool
    path = conf.dependency_path('waf-tools')

    conf.load([name], tooldir=[os.path.join(path, category)])
开发者ID:nitesh5513,项目名称:external-waf,代码行数:9,代码来源:wurf_tools.py

示例13: configure

def configure(conf):
	"""
	Configuration for gdc
	"""
	conf.find_gdc()
	conf.load('ar')
	conf.load('d')
	conf.common_flags_gdc()
	conf.d_platform_flags()
开发者ID:afeldman,项目名称:waf,代码行数:9,代码来源:gdc.py

示例14: find_msvc

def find_msvc(conf):
	"""Due to path format limitations, limit operation only to native Win32. Yeah it sucks."""
	if sys.platform == 'cygwin':
		conf.fatal('MSVC module does not work under cygwin Python!')

	# the autodetection is supposed to be performed before entering in this method
	v = conf.env
	path = v['PATH']
	compiler = v['MSVC_COMPILER']
	version = v['MSVC_VERSION']

	compiler_name, linker_name, lib_name = _get_prog_names(conf, compiler)
	v.MSVC_MANIFEST = (compiler == 'msvc' and version >= 8) or (compiler == 'wsdk' and version >= 6) or (compiler == 'intel' and version >= 11)

	# compiler
	cxx = None
	if v['CXX']: cxx = v['CXX']
	elif 'CXX' in conf.environ: cxx = conf.environ['CXX']
	cxx = conf.find_program(compiler_name, var='CXX', path_list=path)
	cxx = conf.cmd_to_list(cxx)

	# before setting anything, check if the compiler is really msvc
	env = dict(conf.environ)
	if path: env.update(PATH = ';'.join(path))
	if not conf.cmd_and_log(cxx + ['/nologo', '/help'], env=env):
		conf.fatal('the msvc compiler could not be identified')

	# c/c++ compiler
	v['CC'] = v['CXX'] = cxx
	v['CC_NAME'] = v['CXX_NAME'] = 'msvc'

	# linker
	if not v['LINK_CXX']:
		link = conf.find_program(linker_name, path_list=path)
		if link: v['LINK_CXX'] = link
		else: conf.fatal('%s was not found (linker)' % linker_name)
		v['LINK'] = link

	if not v['LINK_CC']:
		v['LINK_CC'] = v['LINK_CXX']

	# staticlib linker
	if not v['AR']:
		stliblink = conf.find_program(lib_name, path_list=path, var='AR')
		if not stliblink: return
		v['ARFLAGS'] = ['/NOLOGO']

	# manifest tool. Not required for VS 2003 and below. Must have for VS 2005 and later
	if v.MSVC_MANIFEST:
		conf.find_program('MT', path_list=path, var='MT')
		v['MTFLAGS'] = ['/NOLOGO']

	try:
		conf.load('winres')
	except Errors.WafError:
		warn('Resource compiler not found. Compiling resource file is disabled')
开发者ID:anthonyrisinger,项目名称:zippy,代码行数:56,代码来源:msvc.py

示例15: configure

def configure(conf):
    """
    The configure function for the bundle dependency tool
    :param conf: the configuration context
    """
    conf.load('wurf_dependency_resolve')

    # Get the path where the bundled dependencies should be
    # placed
    bundle_path = expand_path(conf.options.bundle_path)

    # List all the dependencies to be bundled
    bundle_list = expand_bundle(conf, conf.options.bundle)

    # List all the dependencies with an explicit path
    explicit_list = explicit_dependencies(conf.options)

    # Make sure that no dependencies were both explicitly specified
    # and specified as bundled
    overlap = set(bundle_list).intersection(set(explicit_list))

    if len(overlap) > 0:
        conf.fatal("Overlapping dependencies %r" % overlap)

    conf.env['BUNDLE_DEPENDENCIES'] = dict()

    # Loop over all dependencies and fetch the ones
    # specified in the bundle_list
    for name in bundle_list:

        Utils.check_dir(bundle_path)

        conf.start_msg('Resolve dependency %s' % name)

        key = DEPENDENCY_CHECKOUT_KEY % name
        dependency_checkout = getattr(conf.options, key, None)

        dependency_path = dependencies[name].resolve(
            ctx=conf,
            path=bundle_path,
            use_checkout=dependency_checkout)

        conf.end_msg(dependency_path)

        conf.env['BUNDLE_DEPENDENCIES'][name] = dependency_path

    for name in explicit_list:
        key = DEPENDENCY_PATH_KEY % name
        dependency_path = getattr(conf.options, key)
        dependency_path = expand_path(dependency_path)

        conf.start_msg('User resolve dependency %s' % name)
        conf.env['BUNDLE_DEPENDENCIES'][name] = dependency_path
        conf.end_msg(dependency_path)
开发者ID:nitesh5513,项目名称:external-waf,代码行数:54,代码来源:wurf_dependency_bundle.py


注:本文中的waflib.Configure.conf.load函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。