本文整理汇总了Python中waflib.TaskGen.task_gen方法的典型用法代码示例。如果您正苦于以下问题:Python TaskGen.task_gen方法的具体用法?Python TaskGen.task_gen怎么用?Python TaskGen.task_gen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类waflib.TaskGen
的用法示例。
在下文中一共展示了TaskGen.task_gen方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __call__
# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import task_gen [as 别名]
def __call__(self, *k, **kw):
"""Creates a task generator"""
kw['bld'] = self
ret = TaskGen.task_gen(*k, **kw)
self.task_gen_cache_names = {} # reset the cache, each time
self.add_to_group(ret, group=kw.get('group', None))
return ret
示例2: __call__
# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import task_gen [as 别名]
def __call__(self, *k, **kw):
# this is one way of doing it, one could use a task generator method too
bld = kw['bld'] = bld_proxy(self)
ret = TaskGen.task_gen(*k, **kw)
self.task_gen_cache_names = {}
self.add_to_group(ret, group=kw.get('group'))
ret.bld = bld
bld.set_key(ret.path.abspath().replace(os.sep, '') + str(ret.idx))
return ret
示例3: __call__
# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import task_gen [as 别名]
def __call__(self, *k, **kw):
"""
Create a task generator, adding it to the current build group. The following forms are equivalent::
def build(bld):
tg = bld(a=1, b=2)
def build(bld):
tg = bld()
tg.a = 1
tg.b = 2
"""
kw['bld'] = self
ret = TaskGen.task_gen(*k, **kw)
self.task_gen_cache_names = {} # reset the cache, each time
self.add_to_group(ret, group=kw.get('group', None))
return ret
示例4: __call__
# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import task_gen [as 别名]
def __call__(self, *k, **kw):
"""
Create a task generator and add it to the current build group. The following forms are equivalent::
def build(bld):
tg = bld(a=1, b=2)
def build(bld):
tg = bld()
tg.a = 1
tg.b = 2
def build(bld):
tg = TaskGen.task_gen(a=1, b=2)
bld.add_to_group(tg, None)
:param group: group name to add the task generator to
:type group: string
"""
kw['bld'] = self
ret = TaskGen.task_gen(*k, **kw)
self.task_gen_cache_names = {} # reset the cache, each time
self.add_to_group(ret, group=kw.get('group'))
return ret
示例5: __call__
# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import task_gen [as 别名]
def __call__(self, *k, **kw):
kw["bld"] = self
ret = TaskGen.task_gen(*k, **kw)
self.task_gen_cache_names = {}
self.add_to_group(ret, group=kw.get("group", None))
return ret
示例6: __call__
# 需要导入模块: from waflib import TaskGen [as 别名]
# 或者: from waflib.TaskGen import task_gen [as 别名]
def __call__(self,*k,**kw):
kw['bld']=self
ret=TaskGen.task_gen(*k,**kw)
self.task_gen_cache_names={}
self.add_to_group(ret,group=kw.get('group'))
return ret