mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Build ireq line from parent for installed dist
This commit is contained in:
parent
67e42423d0
commit
6b34b39b7e
1 changed files with 8 additions and 4 deletions
|
@ -82,11 +82,15 @@ def make_install_req_from_editable(link, parent):
|
|||
|
||||
def make_install_req_from_dist(dist, parent):
|
||||
# type: (Distribution, InstallRequirement) -> InstallRequirement
|
||||
project_name = canonicalize_name(dist.project_name)
|
||||
if parent.req:
|
||||
line = str(parent.req)
|
||||
elif parent.link:
|
||||
line = "{} @ {}".format(project_name, parent.link.url)
|
||||
else:
|
||||
line = "{}=={}".format(project_name, dist.parsed_version)
|
||||
ireq = install_req_from_line(
|
||||
"{}=={}".format(
|
||||
canonicalize_name(dist.project_name),
|
||||
dist.parsed_version,
|
||||
),
|
||||
line,
|
||||
comes_from=parent.comes_from,
|
||||
use_pep517=parent.use_pep517,
|
||||
isolated=parent.isolated,
|
||||
|
|
Loading…
Reference in a new issue