Avoid modifying path placeholders created by editable installs
The setuptools implementation of editable installs will insert a placeholder entry into sys.path as part of its magic to register its custom import mechanism. These are not real filesystem paths and as such should not be rewritten to absolute paths.
This commit is contained in:
1
changelog/1028.bugfix
Normal file
1
changelog/1028.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix compatiblity issue between `looponfail` and editable installs.
|
||||
@@ -160,7 +160,8 @@ def init_worker_session(channel, args, option_dict):
|
||||
newpaths = []
|
||||
for p in sys.path:
|
||||
if p:
|
||||
if not os.path.isabs(p):
|
||||
# Ignore path placeholders created for editable installs
|
||||
if not os.path.isabs(p) and not p.endswith(".__path_hook__"):
|
||||
p = os.path.abspath(p)
|
||||
newpaths.append(p)
|
||||
sys.path[:] = newpaths
|
||||
|
||||
Reference in New Issue
Block a user