Description
Certain editable installs (those that use a custom finder) fail to import due to path modifications made to support looponfail
.
setuptools
supports a few different modes of editable installs; for one of these, it will insert dummy entries into sys.path
of the form {package_name}.__path_hook__
and register a corresponding path_hook
that will be invoked by the import machinery.
Meanwhile, looponfail
has some logic to rewrite sys.path
to resolve any non-absolute paths. Unfortunately this ends up mangling the path entries inserted to support editable installs, and breaks their import.
It's not clear why the path rewrite code exists in looponfail
; can anyone comment on whether it's still needed? If not, then the simplest possible fix would be to simply remove it. Alternatively the code could specifically avoid modifying entries which appear to be path hooks.