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


Python waflib.Configure类代码示例

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


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

示例1: update

def update(ctx):
	lst=os.listdir(Context.waf_dir+'/waflib/extras')
	for x in lst:
		if not x.endswith('.py'):
			continue
		tool=x.replace('.py','')
		Configure.download_tool(tool,force=True)
开发者ID:RunarFreyr,项目名称:waz,代码行数:7,代码来源:Scripting.py

示例2: update

def update(ctx):
	"""download a specific tool into the local waf directory"""
	lst = os.listdir(Context.waf_dir + '/waflib/extras')
	for x in lst:
		if not x.endswith('.py'):
			continue
		tool = x.replace('.py', '')
		Configure.download_tool(tool, force=True)
开发者ID:RunarFreyr,项目名称:waz,代码行数:8,代码来源:Scripting.py

示例3: update

def update(ctx):
	lst=Options.options.files.split(',')
	if not lst:
		lst=[x for x in Utils.listdir(Context.waf_dir+'/waflib/extras')if x.endswith('.py')]
	for x in lst:
		tool=x.replace('.py','')
		try:
			Configure.download_tool(tool,force=True,ctx=ctx)
		except Errors.WafError:
			Logs.error('Could not find the tool %s in the remote repository'%x)
开发者ID:PseudoSky,项目名称:voodoo,代码行数:10,代码来源:Scripting.py

示例4: update

def update(ctx):
    """updates the plugins from the *waflib/extras* directory"""
    lst = Options.options.files.split(",")
    if not lst:
        lst = [x for x in Utils.listdir(Context.waf_dir + "/waflib/extras") if x.endswith(".py")]
    for x in lst:
        tool = x.replace(".py", "")
        try:
            Configure.download_tool(tool, force=True, ctx=ctx)
        except Errors.WafError:
            Logs.error("Could not find the tool %s in the remote repository" % x)
开发者ID:jsternberg,项目名称:waf,代码行数:11,代码来源:Scripting.py

示例5: configure

def configure(conf):
	conf.find_program('msgfmt', var='MSGFMT')
	# NOTE: it is possible to set INTLTOOL in the environment, but it must not have spaces in it

	intltool = conf.find_program('intltool-merge', var='INTLTOOL')
	if not intltool:
		# if intltool-merge should not be mandatory, catch the thrown exception in your wscript
		if Options.platform == 'win32':
			perl = conf.find_program('perl', var='PERL')
			intltooldir = Configure.find_file('intltool-merge', os.environ['PATH'].split(os.pathsep))
			if not intltooldir:
				conf.fatal('The program intltool-merge (intltool, gettext-devel) is mandatory!')

			conf.env['INTLTOOL'] = Utils.to_list(conf.env['PERL']) + [intltooldir + os.sep + 'intltool-merge']
			conf.msg('Checking for intltool', ' '.join(conf.env['INTLTOOL']))
		else:
			conf.fatal('The program intltool-merge (intltool, gettext-devel) is mandatory!')

	def getstr(varname):
		return getattr(Options.options, varname, '')

	prefix  = conf.env['PREFIX']
	datadir = getstr('datadir')
	if not datadir: datadir = os.path.join(prefix,'share')

	conf.define('LOCALEDIR', os.path.join(datadir, 'locale'))
	conf.define('DATADIR', datadir)

	if conf.env['CC'] or conf.env['CXX']:
		# Define to 1 if <locale.h> is present
		conf.check(header_name='locale.h')
开发者ID:zsx,项目名称:waf,代码行数:31,代码来源:intltool.py

示例6: configure

def configure(conf):
    if not conf.env.CYTHON:
        conf.fatal("cython_extra requires the tool 'cython' to be loaded first.")
    Configure.conf(check_cython_version)
开发者ID:chrippa,项目名称:xmms2,代码行数:4,代码来源:cython_extra.py

示例7: add_obj_file

		self.link_task.inputs.append(node)
def add_obj_file(self,file):
	if not hasattr(self,'obj_files'):self.obj_files=[]
	if not'process_obj_files'in self.meths:self.meths.append('process_obj_files')
	self.obj_files.append(file)
old_define=Configure.ConfigurationContext.__dict__['define']
def define(self,key,val,quote=True):
	old_define(self,key,val,quote)
	if key.startswith('HAVE_'):
		self.env[key]=1
old_undefine=Configure.ConfigurationContext.__dict__['undefine']
def undefine(self,key):
	old_undefine(self,key)
	if key.startswith('HAVE_'):
		self.env[key]=0
def set_incdirs(self,val):
	Logs.warn('compat: change "export_incdirs" by "export_includes"')
	self.export_includes=val
TaskGen.task_gen.export_incdirs=property(None,set_incdirs)

TaskGen.feature('d')(old_importpaths)
TaskGen.before('apply_incpaths')(old_importpaths)
TaskGen.feature('c','cxx','d')(apply_uselib_local)
TaskGen.before('apply_incpaths','propagate_uselib_vars')(apply_uselib_local)
TaskGen.after('apply_link','process_source')(apply_uselib_local)
TaskGen.feature('cprogram','cxxprogram','cstlib','cxxstlib','cshlib','cxxshlib','dprogram','dstlib','dshlib')(apply_objdeps)
TaskGen.after('apply_link')(apply_objdeps)
TaskGen.after('apply_link')(process_obj_files)
TaskGen.taskgen_method(add_obj_file)
Configure.conf(define)
Configure.conf(undefine)
开发者ID:HariKishan8,项目名称:Networks,代码行数:31,代码来源:compat15.py


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