pipinstall.py 文件源码

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

项目:homely 作者: phodge 项目源码 文件源码
def _needs_format(pipcmd):
    """
    pip >= 9.0.0 needs a --format=legacy argument to avoid a DEPRECATION
    warning. This function returns True if the nominated pip executable
    is >= 9.0.0
    """
    try:
        return _needs_format_cache[pipcmd]
    except KeyError:
        pass

    # grab the version number
    output = run([pipcmd, '--version'], stdout=True)[1].decode('utf-8')
    m = re.match(r'^pip (\S+) from ', output)
    needs_format = StrictVersion(m.group(1)) >= '9.0.0'
    _needs_format_cache[pipcmd] = needs_format
    return needs_format
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号