mirror of https://github.com/pypa/pip
Merge pull request #8005 from uranusjr/candidate-from-link-retains-specifier
New resolver: Use requirement line to populate LinkCandidate._ireq
This commit is contained in:
commit
79a0afb79a
|
@ -41,8 +41,12 @@ logger = logging.getLogger(__name__)
|
|||
def make_install_req_from_link(link, parent):
|
||||
# type: (Link, InstallRequirement) -> InstallRequirement
|
||||
assert not parent.editable, "parent is editable"
|
||||
return install_req_from_line(
|
||||
link.url,
|
||||
if parent.req:
|
||||
line = str(parent.req)
|
||||
else:
|
||||
line = link.url
|
||||
ireq = install_req_from_line(
|
||||
line,
|
||||
comes_from=parent.comes_from,
|
||||
use_pep517=parent.use_pep517,
|
||||
isolated=parent.isolated,
|
||||
|
@ -53,6 +57,10 @@ def make_install_req_from_link(link, parent):
|
|||
hashes=parent.hash_options
|
||||
),
|
||||
)
|
||||
if ireq.link is None:
|
||||
ireq.link = link
|
||||
# TODO: Handle wheel cache resolution.
|
||||
return ireq
|
||||
|
||||
|
||||
def make_install_req_from_editable(link, parent):
|
||||
|
|
Loading…
Reference in New Issue