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


Python Logs.verbose方法代码示例

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


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

示例1: test

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def test(self,*k,**kw):
	if not'env'in kw:
		kw['env']=self.env.derive()
	if kw.get('validate',None):
		kw['validate'](kw)
	self.start_msg(kw['msg'],**kw)
	ret=None
	try:
		ret=self.run_build(*k,**kw)
	except self.errors.ConfigurationError:
		self.end_msg(kw['errmsg'],'YELLOW',**kw)
		if Logs.verbose>1:
			raise
		else:
			self.fatal('The configuration failed')
	else:
		kw['success']=ret
	if kw.get('post_check',None):
		ret=kw['post_check'](kw)
	if ret:
		self.end_msg(kw['errmsg'],'YELLOW',**kw)
		self.fatal('The configuration failed %r'%ret)
	else:
		self.end_msg(self.ret_msg(kw['okmsg'],kw),**kw)
	return ret 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:27,代码来源:Configure.py

示例2: check_cfg

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def check_cfg(self,*k,**kw):
	if k:
		lst=k[0].split()
		kw['package']=lst[0]
		kw['args']=' '.join(lst[1:])
	self.validate_cfg(kw)
	if'msg'in kw:
		self.start_msg(kw['msg'],**kw)
	ret=None
	try:
		ret=self.exec_cfg(kw)
	except self.errors.WafError:
		if'errmsg'in kw:
			self.end_msg(kw['errmsg'],'YELLOW',**kw)
		if Logs.verbose>1:
			raise
		else:
			self.fatal('The configuration failed')
	else:
		if not ret:
			ret=True
		kw['success']=ret
		if'okmsg'in kw:
			self.end_msg(self.ret_msg(kw['okmsg'],kw),**kw)
	return ret 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:27,代码来源:c_config.py

示例3: check

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def check(self,*k,**kw):
	self.validate_c(kw)
	self.start_msg(kw['msg'],**kw)
	ret=None
	try:
		ret=self.run_build(*k,**kw)
	except self.errors.ConfigurationError:
		self.end_msg(kw['errmsg'],'YELLOW',**kw)
		if Logs.verbose>1:
			raise
		else:
			self.fatal('The configuration failed')
	else:
		kw['success']=ret
	ret=self.post_check(*k,**kw)
	if not ret:
		self.end_msg(kw['errmsg'],'YELLOW',**kw)
		self.fatal('The configuration failed %r'%ret)
	else:
		self.end_msg(self.ret_msg(kw['okmsg'],kw),**kw)
	return ret 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:23,代码来源:c_config.py

示例4: parse_options

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def parse_options():
	Context.create_context('options').execute()
	for var in Options.envvars:
		(name,value)=var.split('=',1)
		os.environ[name.strip()]=value
	if not Options.commands:
		Options.commands=[default_cmd]
	Options.commands=[x for x in Options.commands if x!='options']
	Logs.verbose=Options.options.verbose
	if Options.options.zones:
		Logs.zones=Options.options.zones.split(',')
		if not Logs.verbose:
			Logs.verbose=1
	elif Logs.verbose>0:
		Logs.zones=['runner']
	if Logs.verbose>2:
		Logs.zones=['*'] 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:19,代码来源:Scripting.py

示例5: exec_command

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def exec_command(self,cmd,**kw):
		subprocess=Utils.subprocess
		kw['shell']=isinstance(cmd,str)
		Logs.debug('runner: %r'%(cmd,))
		Logs.debug('runner_env: kw=%s'%kw)
		if self.logger:
			self.logger.info(cmd)
		if'stdout'not in kw:
			kw['stdout']=subprocess.PIPE
		if'stderr'not in kw:
			kw['stderr']=subprocess.PIPE
		if Logs.verbose and not kw['shell']and not Utils.check_exe(cmd[0]):
			raise Errors.WafError("Program %s not found!"%cmd[0])
		try:
			if kw['stdout']or kw['stderr']:
				p=subprocess.Popen(cmd,**kw)
				(out,err)=p.communicate()
				ret=p.returncode
			else:
				out,err=(None,None)
				ret=subprocess.Popen(cmd,**kw).wait()
		except Exception ,e:
			raise Errors.WafError('Execution failure: %s'%str(e),ex=e) 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:25,代码来源:Context.py

示例6: cmd_and_log

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def cmd_and_log(self,cmd,**kw):
		subprocess=Utils.subprocess
		kw['shell']=isinstance(cmd,str)
		Logs.debug('runner: %r'%(cmd,))
		if'quiet'in kw:
			quiet=kw['quiet']
			del kw['quiet']
		else:
			quiet=None
		if'output'in kw:
			to_ret=kw['output']
			del kw['output']
		else:
			to_ret=STDOUT
		if Logs.verbose and not kw['shell']and not Utils.check_exe(cmd[0]):
			raise Errors.WafError("Program %s not found!"%cmd[0])
		kw['stdout']=kw['stderr']=subprocess.PIPE
		if quiet is None:
			self.to_log(cmd)
		try:
			p=subprocess.Popen(cmd,**kw)
			(out,err)=p.communicate()
		except Exception ,e:
			raise Errors.WafError('Execution failure: %s'%str(e),ex=e) 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:26,代码来源:Context.py

示例7: post

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def post(self):
		buf=[]
		for x in self.source:
			if isinstance(x,waflib.Node.Node):
				y=x
			else:
				y=self.path.find_resource(x)
				if not y:
					if Logs.verbose:
						Logs.warn('Could not find %s immediately (may cause broken builds)'%x)
					idx=self.generator.bld.get_group_idx(self)
					for tg in self.generator.bld.groups[idx]:
						if not isinstance(tg,inst)and id(tg)!=id(self):
							tg.post()
						y=self.path.find_resource(x)
						if y:
							break
					else:
						raise Errors.WafError('Could not find %r in %r'%(x,self.path))
			buf.append(y)
		self.inputs=buf 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:23,代码来源:Build.py

示例8: post

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [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

示例9: load_module

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def load_module(path,encoding=None):
	ret=rev(path,encoding)
	if'set_options'in ret.__dict__:
		if Logs.verbose:
			Logs.warn('compat: rename "set_options" to "options" (%r)'%path)
		ret.options=ret.set_options
	if'srcdir'in ret.__dict__:
		if Logs.verbose:
			Logs.warn('compat: rename "srcdir" to "top" (%r)'%path)
		ret.top=ret.srcdir
	if'blddir'in ret.__dict__:
		if Logs.verbose:
			Logs.warn('compat: rename "blddir" to "out" (%r)'%path)
		ret.out=ret.blddir
	Utils.g_module=Context.g_module
	Options.launch_dir=Context.launch_dir
	return ret 
开发者ID:KTH,项目名称:royal-chaos,代码行数:19,代码来源:compat15.py

示例10: run

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def run(self):
                argparser = fypp.get_option_parser()
                args = [FYPP_LINENUM_FLAG]
                args += self.env.FYPP_FLAGS
		args += [FYPP_DEFINES_ST % ss for ss in self.env['DEFINES']]
		args += [FYPP_INCPATH_ST % ss for ss in self.env['INCLUDES']]
                args += [FYPP_INIFILES_ST % ss for ss in self.env['INIFILES']]
                args += [FYPP_MODULES_ST % ss for ss in self.env['MODULES']]
                opts, leftover = argparser.parse_args(args)
                infile = self.inputs[0].abspath()
                outfile = self.outputs[0].abspath()
                if Logs.verbose:
                        Logs.debug('runner: fypp.Fypp %r %r %r' 
                                   % (args, infile, outfile))
                
		tool = fypp.Fypp(opts)
                try:
		        tool.process_file(infile, outfile)
                except fypp.FyppError as err:
                        msg = ("%s [%s:%d]"
                               % (err.msg, err.fname, err.span[0] + 1))
                        raise FyppPreprocError(msg)
		return 0 
开发者ID:aradi,项目名称:fypp,代码行数:25,代码来源:fypp_preprocessor.py

示例11: sig_implicit_deps

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def sig_implicit_deps(self):
		bld=self.generator.bld
		key=self.uid()
		prev=bld.task_sigs.get((key,'imp'),[])
		if prev:
			try:
				if prev==self.compute_sig_implicit_deps():
					return prev
			except Errors.TaskNotReady:
				raise
			except EnvironmentError:
				for x in bld.node_deps.get(self.uid(),[]):
					if not x.is_bld():
						try:
							os.stat(x.abspath())
						except OSError:
							try:
								del x.parent.children[x.name]
							except KeyError:
								pass
			del bld.task_sigs[(key,'imp')]
			raise Errors.TaskRescan('rescan')
		(nodes,names)=self.scan()
		if Logs.verbose:
			Logs.debug('deps: scanner for %s returned %s %s'%(str(self),str(nodes),str(names)))
		bld.node_deps[key]=nodes
		bld.raw_deps[key]=names
		self.are_implicit_nodes_ready()
		try:
			bld.task_sigs[(key,'imp')]=sig=self.compute_sig_implicit_deps()
		except Exception:
			if Logs.verbose:
				for k in bld.node_deps.get(self.uid(),[]):
					try:
						k.get_bld_sig()
					except Exception:
						Logs.warn('Missing signature for node %r (may cause rebuilds)'%k)
		else:
			return sig 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:41,代码来源:Task.py

示例12: run

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def run(self):
		env=self.env
		gen=self.generator
		bld=gen.bld
		wd=bld.bldnode.abspath()
		def to_list(xx):
			if isinstance(xx,str):return[xx]
			return xx
		cmd=[]
		cmd.extend(to_list(env['JAVAC']))
		cmd.extend(['-classpath'])
		cmd.extend(to_list(env['CLASSPATH']))
		cmd.extend(['-d'])
		cmd.extend(to_list(env['OUTDIR']))
		cmd.extend(to_list(env['JAVACFLAGS']))
		files=[a.path_from(bld.bldnode)for a in self.inputs]
		tmp=None
		try:
			if len(str(files))+len(str(cmd))>8192:
				(fd,tmp)=tempfile.mkstemp(dir=bld.bldnode.abspath())
				try:
					os.write(fd,'\n'.join(files))
				finally:
					if tmp:
						os.close(fd)
				if Logs.verbose:
					Logs.debug('runner: %r'%(cmd+files))
				cmd.append('@'+tmp)
			else:
				cmd+=files
			ret=self.exec_command(cmd,cwd=wd,env=env.env or None)
		finally:
			if tmp:
				os.remove(tmp)
		return ret 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:37,代码来源:javaw.py

示例13: addlines

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def addlines(self,node):
		self.currentnode_stack.append(node.parent)
		filepath=node.abspath()
		self.count_files+=1
		if self.count_files>c_preproc.recursion_limit:
			raise c_preproc.PreprocError("recursion limit exceeded")
		pc=self.parse_cache
		Logs.debug('preproc: reading file %r',filepath)
		try:
			lns=pc[filepath]
		except KeyError:
			pass
		else:
			self.lines.extend(lns)
			return
		try:
			lines=self.filter_comments(filepath)
			lines.append((c_preproc.POPFILE,''))
			lines.reverse()
			pc[filepath]=lines
			self.lines.extend(lines)
		except IOError:
			raise c_preproc.PreprocError("could not read the file %s"%filepath)
		except Exception:
			if Logs.verbose>0:
				Logs.error("parsing %s failed"%filepath)
				traceback.print_exc() 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:29,代码来源:winres.py

示例14: scan

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def scan(self):
		tmp=rc_parser(self.generator.includes_nodes)
		tmp.start(self.inputs[0],self.env)
		nodes=tmp.nodes
		names=tmp.names
		if Logs.verbose:
			Logs.debug('deps: deps for %s: %r; unresolved %r'%(str(self),nodes,names))
		return(nodes,names) 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:10,代码来源:winres.py

示例15: scan

# 需要导入模块: from waflib import Logs [as 别名]
# 或者: from waflib.Logs import verbose [as 别名]
def scan(self):
		tmp=fc_scan.fortran_parser(self.generator.includes_nodes)
		tmp.task=self
		tmp.start(self.inputs[0])
		if Logs.verbose:
			Logs.debug('deps: deps for %r: %r; unresolved %r'%(self.inputs,tmp.nodes,tmp.names))
		return(tmp.nodes,tmp.names) 
开发者ID:MOSAIC-UA,项目名称:802.11ah-ns3,代码行数:9,代码来源:fc.py


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