Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/4789.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't emit ``Package would be ignored`` warning for explicitly included data files.
6 changes: 5 additions & 1 deletion setuptools/command/build_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ def analyze_manifest(self) -> None:
files = ei_cmd.filelist.files

check = _IncludePackageDataAbuse()
data_files = {
package: filenames
for package, _, _, filenames in self.get_data_files_without_manifest()
}
for path in self._filter_build_files(files, egg_info_dir):
d, f = os.path.split(assert_relative(path))
prev = None
Expand All @@ -208,7 +212,7 @@ def analyze_manifest(self) -> None:
continue # it's a module, not data
else:
importable = check.importable_subpackage(src_dirs[d], f)
if importable:
if importable and f not in data_files.get(d, {}):
check.warn(importable)
self.manifest_files.setdefault(src_dirs[d], []).append(path)

Expand Down
Loading