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


Python TaskGen.feature方法代码示例

本文整理汇总了Python中waflib.TaskGen.feature方法的典型用法代码示例。如果您正苦于以下问题:Python TaskGen.feature方法的具体用法?Python TaskGen.feature怎么用?Python TaskGen.feature使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在waflib.TaskGen的用法示例。


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

示例1: check_invalid_constraints

# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import feature [as 别名]
def check_invalid_constraints(self):
	feat=set([])
	for x in list(TaskGen.feats.values()):
		feat.union(set(x))
	for(x,y)in TaskGen.task_gen.prec.items():
		feat.add(x)
		feat.union(set(y))
	ext=set([])
	for x in TaskGen.task_gen.mappings.values():
		ext.add(x.__name__)
	invalid=ext&feat
	if invalid:
		Logs.error('The methods %r have invalid annotations:  @extension <-> @feature/@before_method/@after_method'%list(invalid))
	for cls in list(Task.classes.values()):
		for x in('before','after'):
			for y in Utils.to_list(getattr(cls,x,[])):
				if not Task.classes.get(y,None):
					Logs.error('Erroneous order constraint %r=%r on task class %r'%(x,y,cls.__name__))
		if getattr(cls,'rule',None):
			Logs.error('Erroneous attribute "rule" on task class %r (rename to "run_str")'%cls.__name__) 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:22,代码来源:errcheck.py

示例2: post

# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import feature [as 别名]
def post(self):
	self.features=self.to_list(self.features)
	if'cc'in self.features:
		if Logs.verbose:
			Logs.warn('compat: the feature cc does not exist anymore (use "c")')
		self.features.remove('cc')
		self.features.append('c')
	if'cstaticlib'in self.features:
		if Logs.verbose:
			Logs.warn('compat: the feature cstaticlib does not exist anymore (use "cstlib" or "cxxstlib")')
		self.features.remove('cstaticlib')
		self.features.append(('cxx'in self.features)and'cxxstlib'or'cstlib')
	if getattr(self,'ccflags',None):
		if Logs.verbose:
			Logs.warn('compat: "ccflags" was renamed to "cflags"')
		self.cflags=self.ccflags
	return old_post(self) 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:19,代码来源:compat15.py

示例3: check_invalid_constraints

# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import feature [as 别名]
def check_invalid_constraints(self):
	feat=set([])
	for x in list(TaskGen.feats.values()):
		feat.union(set(x))
	for(x,y)in TaskGen.task_gen.prec.items():
		feat.add(x)
		feat.union(set(y))
	ext=set([])
	for x in TaskGen.task_gen.mappings.values():
		ext.add(x.__name__)
	invalid=ext&feat
	if invalid:
		Logs.error('The methods %r have invalid annotations:  @extension <-> @feature/@before_method/@after_method'%list(invalid))
	for cls in list(Task.classes.values()):
		if sys.hexversion>0x3000000 and issubclass(cls,Task.Task)and isinstance(cls.hcode,str):
			raise Errors.WafError('Class %r has hcode value %r of type <str>, expecting <bytes> (use Utils.h_cmd() ?)'%(cls,cls.hcode))
		for x in('before','after'):
			for y in Utils.to_list(getattr(cls,x,[])):
				if not Task.classes.get(y,None):
					Logs.error('Erroneous order constraint %r=%r on task class %r'%(x,y,cls.__name__))
		if getattr(cls,'rule',None):
			Logs.error('Erroneous attribute "rule" on task class %r (rename to "run_str")'%cls.__name__) 
开发者ID:KTH,项目名称:royal-chaos,代码行数:24,代码来源:errcheck.py

示例4: feature_py

# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import feature [as 别名]
def feature_py(self):
	"""
	Dummy feature which does nothing
	"""
	pass 
开发者ID:ntu-dsi-dcn,项目名称:ntu-dsi-dcn,代码行数:7,代码来源:python.py


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