From 2372749be2e92df5d2aab11b1407948a8e25bf2f Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sun, 21 Aug 2022 06:34:41 +0100 Subject: Fix recursion problem in finder --- setuptools/command/editable_wheel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/editable_wheel.py b/setuptools/command/editable_wheel.py index ea214841..cd535e48 100644 --- a/setuptools/command/editable_wheel.py +++ b/setuptools/command/editable_wheel.py @@ -755,7 +755,7 @@ class _EditableFinder: # MetaPathFinder def find_spec(cls, fullname, path=None, target=None): for pkg, pkg_path in reversed(list(MAPPING.items())): if fullname.startswith(pkg): - rest = fullname.replace(pkg, "").strip(".").split(".") + rest = fullname.replace(pkg, "", 1).strip(".").split(".") return cls._find_spec(fullname, Path(pkg_path, *rest)) return None -- cgit v1.2.1