@@ -176,7 +176,7 @@ def install_req_from_editable(
176
176
177
177
def install_req_from_line (
178
178
name , comes_from = None , isolated = False , options = None , wheel_cache = None ,
179
- constraint = False
179
+ constraint = False , package_name = None ,
180
180
):
181
181
"""Creates an InstallRequirement from a name, which might be a
182
182
requirement, directory containing 'setup.py', filename, or URL.
@@ -263,6 +263,8 @@ def install_req_from_line(
263
263
"Invalid requirement: '%s'\n %s" % (req , add_msg )
264
264
)
265
265
266
+ assert package_name is None or req .name == package_name
267
+
266
268
return InstallRequirement (
267
269
req , comes_from , link = link , markers = markers ,
268
270
isolated = isolated ,
@@ -292,6 +294,11 @@ def install_req_from_req(
292
294
"which are not also hosted on PyPI.\n "
293
295
"%s depends on %s " % (comes_from .name , req )
294
296
)
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 )
295
302
296
303
return InstallRequirement (
297
304
req , comes_from , isolated = isolated , wheel_cache = wheel_cache
0 commit comments