Skip to content

Commit 96b8608

Browse files
committed
Temporarily push a version of Benoit Peirre's changes so we can pip install it
From pypa#5780 (comment)
1 parent f4bda78 commit 96b8608

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/pip/_internal/req/constructors.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def install_req_from_editable(
176176

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

266+
assert package_name is None or req.name == package_name
267+
266268
return InstallRequirement(
267269
req, comes_from, link=link, markers=markers,
268270
isolated=isolated,
@@ -292,6 +294,11 @@ def install_req_from_req(
292294
"which are not also hosted on PyPI.\n"
293295
"%s depends on %s " % (comes_from.name, req)
294296
)
297+
if req.url:
298+
return install_req_from_line(req.url, comes_from=comes_from,
299+
isolated=isolated,
300+
wheel_cache=wheel_cache,
301+
package_name=req.name)
295302

296303
return InstallRequirement(
297304
req, comes_from, isolated=isolated, wheel_cache=wheel_cache

0 commit comments

Comments
 (0)