Skip to content

Commit e2135d5

Browse files
committed
Avoid adding PathEntryFinder if not necessary
1 parent 3c77bc6 commit e2135d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

setuptools/command/editable_wheel.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,10 @@ def find_module(cls, fullname):
563563
def install():
564564
if not any(finder == _EditableFinder for finder in sys.meta_path):
565565
sys.meta_path.append(_EditableFinder)
566+
567+
if not NAMESPACES:
568+
return
569+
566570
if not any(hook == _EditableNamespaceFinder._path_hook for hook in sys.path_hooks):
567571
# PathEntryFinder is needed to create NamespaceSpec without private APIS
568572
sys.path_hooks.append(_EditableNamespaceFinder._path_hook)

0 commit comments

Comments
 (0)