setupbase.py 文件源码

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

项目:mimerender-cookiecutter 作者: jupyterlab 项目源码 文件源码
def ensure_targets(targets):
    """Return a Command that checks that certain files exist.

    Raises a ValueError if any of the files are missing.

    Note: The check is skipped if the `--skip-npm` flag is used.
    """

    class TargetsCheck(BaseCommand):
        def run(self):
            if skip_npm:
                log.info('Skipping target checks')
                return
            missing = [t for t in targets if not os.path.exists(t)]
            if missing:
                raise ValueError(('missing files: %s' % missing))

    return TargetsCheck


# `shutils.which` function copied verbatim from the Python-3.3 source.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号