未验证 提交 c3c28318 编写于 作者: P Pradyun Gedam 提交者: GitHub

Merge pull request #6980 from pradyunsg/refactor/simplify-make_distribution

Improve make_distribution_for_install_requirement()
......@@ -12,11 +12,13 @@ def make_distribution_for_install_requirement(install_req):
# type: (InstallRequirement) -> AbstractDistribution
"""Returns a Distribution for the given InstallRequirement
"""
# If it's not an editable, is a wheel, it's a WheelDistribution
# Editable requirements will always be source distributions. They use the
# legacy logic until we create a modern standard for them.
if install_req.editable:
return SourceDistribution(install_req)
if install_req.link and install_req.is_wheel:
# If it's a wheel, it's a WheelDistribution
if install_req.is_wheel:
return WheelDistribution(install_req)
# Otherwise, a SourceDistribution
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册