77
88import pathspec
99
10- from scikit_build_core .format import pyproject_format
10+ from .._logging import logger
11+ from ..format import pyproject_format
1112
1213if TYPE_CHECKING :
1314 from collections .abc import Generator , Sequence
@@ -72,19 +73,31 @@ def each_unignored_file(
7273 for p in all_paths :
7374 # Always include something included
7475 if include_spec .match_file (p ):
76+ logger .debug ("Including {} because it is explicitly included." , p )
7577 yield p
7678 continue
7779
7880 # Always exclude something excluded
7981 if user_exclude_spec .match_file (p ):
82+ logger .debug (
83+ "Excluding {} because it is explicitly excluded by the user." , p
84+ )
8085 continue
8186
8287 # Ignore from global ignore
8388 if global_exclude_spec .match_file (p ):
89+ logger .debug (
90+ "Excluding {} because it is explicitly excluded by the global ignore." ,
91+ p ,
92+ )
8493 continue
8594
8695 # Ignore built-in patterns
8796 if builtin_exclude_spec .match_file (p ):
97+ logger .debug (
98+ "Excluding {} because it is excluded by the built-in ignore patterns." ,
99+ p ,
100+ )
88101 continue
89102
90103 # Check relative ignores (Python 3.9's is_relative_to workaround)
@@ -93,6 +106,10 @@ def each_unignored_file(
93106 for np , nex in nested_excludes .items ()
94107 if dirpath == np or np in dirpath .parents
95108 ):
109+ logger .debug (
110+ "Excluding {} because it is explicitly excluded by nested ignore." ,
111+ p ,
112+ )
96113 continue
97114
98115 yield p
0 commit comments