当前位置: 首页>>代码示例>>Python>>正文


Python FrozenRequirement.from_dist方法代码示例

本文整理汇总了Python中pip.FrozenRequirement.from_dist方法的典型用法代码示例。如果您正苦于以下问题:Python FrozenRequirement.from_dist方法的具体用法?Python FrozenRequirement.from_dist怎么用?Python FrozenRequirement.from_dist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pip.FrozenRequirement的用法示例。


在下文中一共展示了FrozenRequirement.from_dist方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: dist_is_editable

# 需要导入模块: from pip import FrozenRequirement [as 别名]
# 或者: from pip.FrozenRequirement import from_dist [as 别名]
def dist_is_editable(dist):
    """Is distribution an editable install?"""
    #TODO: factor out determining editableness out of FrozenRequirement
    from pip import FrozenRequirement
    req = FrozenRequirement.from_dist(dist, [])
    return req.editable 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:8,代码来源:util.py

示例2: frozen_req_from_dist

# 需要导入模块: from pip import FrozenRequirement [as 别名]
# 或者: from pip.FrozenRequirement import from_dist [as 别名]
def frozen_req_from_dist(dist):
    try:
        return FrozenRequirement.from_dist(dist)
    except TypeError:
        return FrozenRequirement.from_dist(dist, []) 
开发者ID:naiquevin,项目名称:pipdeptree,代码行数:7,代码来源:pipdeptree.py

示例3: dist_is_editable

# 需要导入模块: from pip import FrozenRequirement [as 别名]
# 或者: from pip.FrozenRequirement import from_dist [as 别名]
def dist_is_editable(dist):
    """Is distribution an editable install?"""
    # TODO: factor out determining editableness out of FrozenRequirement
    from pip import FrozenRequirement
    req = FrozenRequirement.from_dist(dist, [])
    return req.editable 
开发者ID:chalasr,项目名称:Flask-P2P,代码行数:8,代码来源:__init__.py

示例4: dist_to_req

# 需要导入模块: from pip import FrozenRequirement [as 别名]
# 或者: from pip.FrozenRequirement import from_dist [as 别名]
def dist_to_req(dist):
    """Make a pip.FrozenRequirement from a pkg_resources distribution object"""
    try:  # :pragma:nocover: (pip>=10)
        from pip._internal.operations.freeze import FrozenRequirement
    except ImportError:  # :pragma:nocover: (pip<10)
        from pip import FrozenRequirement

    # normalize the casing, dashes in the req name
    orig_name, dist.project_name = dist.project_name, dist.key
    result = FrozenRequirement.from_dist(dist, [])
    # put things back the way we found it.
    dist.project_name = orig_name

    return result 
开发者ID:Yelp,项目名称:venv-update,代码行数:16,代码来源:pip_faster.py


注:本文中的pip.FrozenRequirement.from_dist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。