misc.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:SoCFoundationFlow 作者: mattaw 项目源码 文件源码
def apply_copy(self):
    Utils.def_attrs(self, fun=copy_func)
    self.default_install_path = 0

    lst = self.to_list(self.source)
    self.meths.remove('process_source')

    for filename in lst:
        node = self.path.find_resource(filename)
        if not node: raise Errors.WafError('cannot find input file %s for processing' % filename)

        target = self.target
        if not target or len(lst)>1: target = node.name

        # TODO the file path may be incorrect
        newnode = self.path.find_or_declare(target)

        tsk = self.create_task('copy', node, newnode)
        tsk.fun = self.fun
        tsk.chmod = getattr(self, 'chmod', Utils.O644)

        if not tsk.env:
            tsk.debug()
            raise Errors.WafError('task without an environment')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号