Skip to content

Commit

Permalink
Temporarily push a version of Benoit Peirre's changes so we can pip i…
Browse files Browse the repository at this point in the history
…nstall it

From pypa#5780 (comment)
  • Loading branch information
cam72cam committed Sep 13, 2018
1 parent f4bda78 commit 96b8608
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pip/_internal/req/constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def install_req_from_editable(

def install_req_from_line(
name, comes_from=None, isolated=False, options=None, wheel_cache=None,
constraint=False
constraint=False, package_name=None,
):
"""Creates an InstallRequirement from a name, which might be a
requirement, directory containing 'setup.py', filename, or URL.
Expand Down Expand Up @@ -263,6 +263,8 @@ def install_req_from_line(
"Invalid requirement: '%s'\n%s" % (req, add_msg)
)

assert package_name is None or req.name == package_name

return InstallRequirement(
req, comes_from, link=link, markers=markers,
isolated=isolated,
Expand Down Expand Up @@ -292,6 +294,11 @@ def install_req_from_req(
"which are not also hosted on PyPI.\n"
"%s depends on %s " % (comes_from.name, req)
)
if req.url:
return install_req_from_line(req.url, comes_from=comes_from,
isolated=isolated,
wheel_cache=wheel_cache,
package_name=req.name)

return InstallRequirement(
req, comes_from, isolated=isolated, wheel_cache=wheel_cache
Expand Down

0 comments on commit 96b8608

Please sign in to comment.