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


Python Utils.h_file方法代码示例

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


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

示例1: process_lib

# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import h_file [as 别名]
def process_lib(self):
	node=None
	names=[x%self.name for x in lib_patterns[self.lib_type]]
	for x in self.lib_paths+[self.path]+SYSTEM_LIB_PATHS:
		if not isinstance(x,Node.Node):
			x=self.bld.root.find_node(x)or self.path.find_node(x)
			if not x:
				continue
		for y in names:
			node=x.find_node(y)
			if node:
				node.sig=Utils.h_file(node.abspath())
				break
		else:
			continue
		break
	else:
		raise Errors.WafError('could not find library %r'%self.name)
	self.link_task=self.create_task('fake_%s'%self.lib_type,[],[node])
	self.target=self.name 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:22,代码来源:ccroot.py

示例2: load_envs

# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import h_file [as 别名]
def load_envs(self):
		node=self.root.find_node(self.cache_dir)
		if not node:
			raise Errors.WafError('The project was not configured: run "waf configure" first!')
		lst=node.ant_glob('**/*%s'%CACHE_SUFFIX,quiet=True)
		if not lst:
			raise Errors.WafError('The cache directory is empty: reconfigure the project')
		for x in lst:
			name=x.path_from(node).replace(CACHE_SUFFIX,'').replace('\\','/')
			env=ConfigSet.ConfigSet(x.abspath())
			self.all_envs[name]=env
			for f in env[CFG_FILES]:
				newnode=self.root.find_resource(f)
				try:
					h=Utils.h_file(newnode.abspath())
				except(IOError,AttributeError):
					Logs.error('cannot find %r'%f)
					h=Utils.SIG_NIL
				newnode.sig=h 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:21,代码来源:Build.py

示例3: post_run

# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import h_file [as 别名]
def post_run(self):
	for x in self.outputs:
		x.sig = Utils.h_file(x.abspath()) 
开发者ID:ntu-dsi-dcn,项目名称:ntu-dsi-dcn,代码行数:5,代码来源:misc.py

示例4: update_outputs

# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import h_file [as 别名]
def update_outputs(cls):
	old_post_run=cls.post_run
	def post_run(self):
		old_post_run(self)
		for node in self.outputs:
			node.sig=node.cache_sig=Utils.h_file(node.abspath())
			self.generator.bld.task_sigs[node.abspath()]=self.uid()
	cls.post_run=post_run
	old_runnable_status=cls.runnable_status
	def runnable_status(self):
		status=old_runnable_status(self)
		if status!=RUN_ME:
			return status
		try:
			bld=self.generator.bld
			prev_sig=bld.task_sigs[self.uid()]
			if prev_sig==self.signature():
				for x in self.outputs:
					if not x.is_child_of(bld.bldnode):
						x.sig=Utils.h_file(x.abspath())
					if not x.sig or bld.task_sigs[x.abspath()]!=self.uid():
						return RUN_ME
				return SKIP_ME
		except OSError:
			pass
		except IOError:
			pass
		except KeyError:
			pass
		except IndexError:
			pass
		except AttributeError:
			pass
		return RUN_ME
	cls.runnable_status=runnable_status
	return cls 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:38,代码来源:Task.py

示例5: post_run

# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import h_file [as 别名]
def post_run(self):
		for n in self.generator.outdir.ant_glob('**/*.class'):
			n.sig=Utils.h_file(n.abspath())
		self.generator.bld.task_sigs[self.uid()]=self.cache_sig 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:6,代码来源:javaw.py

示例6: runnable_status

# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import h_file [as 别名]
def runnable_status(self):
		for x in self.outputs:
			x.sig=Utils.h_file(x.abspath())
		return Task.SKIP_ME 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:6,代码来源:cs.py

示例7: runnable_status

# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import h_file [as 别名]
def runnable_status(self):
		for t in self.run_after:
			if not t.hasrun:
				return Task.ASK_LATER
		for x in self.outputs:
			x.sig=Utils.h_file(x.abspath())
		return Task.SKIP_ME 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:9,代码来源:ccroot.py

示例8: hash_aux_nodes

# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import h_file [as 别名]
def hash_aux_nodes(self):
		try:
			nodes=self.aux_nodes
		except AttributeError:
			try:
				self.aux_nodes=self.scan_aux(self.inputs[0].change_ext('.aux'))
			except IOError:
				return None
		return Utils.h_list([Utils.h_file(x.abspath())for x in self.aux_nodes]) 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:11,代码来源:tex.py

示例9: get_bld_sig

# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import h_file [as 别名]
def get_bld_sig(self):
		try:
			return self.cache_sig
		except AttributeError:
			pass
		if not self.is_bld()or self.ctx.bldnode is self.ctx.srcnode:
			self.sig=Utils.h_file(self.abspath())
		self.cache_sig=ret=self.sig
		return ret 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:11,代码来源:Node.py

示例10: hash_aux_nodes

# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import h_file [as 别名]
def hash_aux_nodes(self):
		try:
			self.aux_nodes
		except AttributeError:
			try:
				self.aux_nodes=self.scan_aux(self.inputs[0].change_ext('.aux'))
			except IOError:
				return None
		return Utils.h_list([Utils.h_file(x.abspath())for x in self.aux_nodes]) 
开发者ID:KTH,项目名称:royal-chaos,代码行数:11,代码来源:tex.py


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