diff options
| author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-08-24 10:31:38 +0100 |
|---|---|---|
| committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-08-24 10:31:38 +0100 |
| commit | c0d9f43bcd3140fb4213d57675ae9beaec5607a3 (patch) | |
| tree | d7f177bc1ee048b86d4b09cdec12ed945d7be8dd /setuptools/command/editable_wheel.py | |
| parent | af1ff35b3715b5f2baf4b2fbe22a818b471b4513 (diff) | |
| parent | 52bf418dedc7fa9a7fa2e3c641b414eda67f5c3c (diff) | |
| download | python-setuptools-git-c0d9f43bcd3140fb4213d57675ae9beaec5607a3.tar.gz | |
Prevent accidental name matching in editable hooks (#3562)
Diffstat (limited to 'setuptools/command/editable_wheel.py')
| -rw-r--r-- | setuptools/command/editable_wheel.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/setuptools/command/editable_wheel.py b/setuptools/command/editable_wheel.py index b908298f..d05c3a75 100644 --- a/setuptools/command/editable_wheel.py +++ b/setuptools/command/editable_wheel.py @@ -758,7 +758,7 @@ class _EditableFinder: # MetaPathFinder @classmethod def find_spec(cls, fullname, path=None, target=None): for pkg, pkg_path in reversed(list(MAPPING.items())): - if fullname.startswith(pkg): + if fullname == pkg or fullname.startswith(f"{{pkg}}."): rest = fullname.replace(pkg, "", 1).strip(".").split(".") return cls._find_spec(fullname, Path(pkg_path, *rest)) |
