Skip to content

Commit 6818948

Browse files
committed
Consider extra path in editable finder
1 parent 9785782 commit 6818948

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setuptools/command/editable_wheel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,8 @@ def _get_root(self):
777777
class _EditableFinder: # MetaPathFinder
778778
@classmethod
779779
def find_spec(cls, fullname, path=None, target=None):
780+
extra_path = []
781+
780782
# Top-level packages and modules (we know these exist in the FS)
781783
if fullname in MAPPING:
782784
pkg_path = MAPPING[fullname]
@@ -787,7 +789,7 @@ def find_spec(cls, fullname, path=None, target=None):
787789
# to the importlib.machinery implementation.
788790
parent, _, child = fullname.rpartition(".")
789791
if parent and parent in MAPPING:
790-
return PathFinder.find_spec(fullname, path=[MAPPING[parent]])
792+
return PathFinder.find_spec(fullname, path=[MAPPING[parent], *extra_path])
791793
792794
# Other levels of nesting should be handled automatically by importlib
793795
# using the parent path.

0 commit comments

Comments
 (0)