本文整理汇总了Python中waflib.Utils.nogc方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.nogc方法的具体用法?Python Utils.nogc怎么用?Python Utils.nogc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类waflib.Utils
的用法示例。
在下文中一共展示了Utils.nogc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: isinstance
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import nogc [as 别名]
if pat.startswith('in:'):
out=False
pat=pat.replace('in:','')
elif pat.startswith('out:'):
inn=False
pat=pat.replace('out:','')
pat=re.compile(pat,re.M)
for g in self.groups:
for tg in g:
if isinstance(tg,Task.TaskBase):
lst=[tg]
else:
lst=tg.tasks
for tsk in lst:
do_exec=False
if inn:
for node in getattr(tsk,'inputs',[]):
if pat.search(node.abspath()):
do_exec=True
break
if out and not do_exec:
for node in getattr(tsk,'outputs',[]):
if pat.search(node.abspath()):
do_exec=True
break
if do_exec:
ret=tsk.run()
Logs.info('%s -> %r'%(str(tsk),ret))
BuildContext.store=Utils.nogc(BuildContext.store)
BuildContext.load=Utils.nogc(BuildContext.load)
示例2: isinstance
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import nogc [as 别名]
pat = pat.replace("in:", "")
elif pat.startswith("out:"):
inn = False
pat = pat.replace("out:", "")
pat = re.compile(pat, re.M)
for g in self.groups:
for tg in g:
if isinstance(tg, Task.TaskBase):
lst = [tg]
else:
lst = tg.tasks
for tsk in lst:
do_exec = False
if inn:
for node in getattr(tsk, "inputs", []):
if pat.search(node.abspath()):
do_exec = True
break
if out and not do_exec:
for node in getattr(tsk, "outputs", []):
if pat.search(node.abspath()):
do_exec = True
break
if do_exec:
ret = tsk.run()
Logs.info("%s -> %r" % (str(tsk), ret))
BuildContext.store = Utils.nogc(BuildContext.store)
BuildContext.restore = Utils.nogc(BuildContext.restore)
示例3: isinstance
# 需要导入模块: from waflib import Utils [as 别名]
# 或者: from waflib.Utils import nogc [as 别名]
pat = pat.replace('out:', '')
pat = re.compile(pat, re.M)
for g in self.groups:
for tg in g:
if isinstance(tg, Task.TaskBase):
lst = [tg]
else:
lst = tg.tasks
for tsk in lst:
do_exec = False
if inn:
for node in getattr(tsk, 'inputs', []):
if pat.search(node.abspath()):
do_exec = True
break
if out and not do_exec:
for node in getattr(tsk, 'outputs', []):
if pat.search(node.abspath()):
do_exec = True
break
if do_exec:
ret = tsk.run()
Logs.info('%s -> %r' % (str(tsk), ret))
BuildContext.save = Utils.nogc(BuildContext.save)
BuildContext.load = Utils.nogc(BuildContext.load)