Ignore editable installation modules

This commit is contained in:
GergelyKalmar 2022-08-20 14:25:20 +02:00
parent d9d890ee15
commit cfa51788a6
No known key found for this signature in database
GPG Key ID: 4B4AD8EC9F699DCF
1 changed files with 2 additions and 1 deletions

View File

@ -836,7 +836,8 @@ def _iter_rewritable_modules(package_files: Iterable[str]) -> Iterator[str]:
if is_simple_module:
module_name, _ = os.path.splitext(fn)
# we ignore "setup.py" at the root of the distribution
if module_name != "setup":
# as well as editable installation finder modules made by setuptools
if module_name != "setup" and not module_name.startswith('__editable__'):
seen_some = True
yield module_name
elif is_package: