File tree 1 file changed +10
-5
lines changed 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,15 @@ def convert_extras(extras):
82
82
return set ()
83
83
84
84
85
+ def looks_like_path (text ):
86
+ # type: (str) -> bool
87
+ return (
88
+ os .path .sep in text or
89
+ os .path .altsep is not None and os .path .altsep in text or
90
+ text .startswith ('.' )
91
+ )
92
+
93
+
85
94
def parse_editable (editable_req ):
86
95
# type: (str) -> Tuple[Optional[str], str, Optional[Set[str]]]
87
96
"""Parses an editable requirement into:
@@ -263,11 +272,7 @@ def install_req_from_line(
263
272
link = Link (name )
264
273
else :
265
274
p , extras_as_string = _strip_extras (path )
266
- looks_like_dir = os .path .isdir (p ) and (
267
- os .path .sep in name or
268
- (os .path .altsep is not None and os .path .altsep in name ) or
269
- name .startswith ('.' )
270
- )
275
+ looks_like_dir = os .path .isdir (p ) and looks_like_path (name )
271
276
if looks_like_dir :
272
277
if not is_installable_dir (p ):
273
278
raise InstallationError (
You can’t perform that action at this time.
0 commit comments