7
7
8
8
import pathspec
9
9
10
- from scikit_build_core .format import pyproject_format
10
+ from .._logging import logger
11
+ from ..format import pyproject_format
11
12
12
13
if TYPE_CHECKING :
13
14
from collections .abc import Generator , Sequence
@@ -72,19 +73,31 @@ def each_unignored_file(
72
73
for p in all_paths :
73
74
# Always include something included
74
75
if include_spec .match_file (p ):
76
+ logger .debug ("Including {} because it is explicitly included." , p )
75
77
yield p
76
78
continue
77
79
78
80
# Always exclude something excluded
79
81
if user_exclude_spec .match_file (p ):
82
+ logger .debug (
83
+ "Excluding {} because it is explicitly excluded by the user." , p
84
+ )
80
85
continue
81
86
82
87
# Ignore from global ignore
83
88
if global_exclude_spec .match_file (p ):
89
+ logger .debug (
90
+ "Excluding {} because it is explicitly excluded by the global ignore." ,
91
+ p ,
92
+ )
84
93
continue
85
94
86
95
# Ignore built-in patterns
87
96
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
+ )
88
101
continue
89
102
90
103
# Check relative ignores (Python 3.9's is_relative_to workaround)
@@ -93,6 +106,10 @@ def each_unignored_file(
93
106
for np , nex in nested_excludes .items ()
94
107
if dirpath == np or np in dirpath .parents
95
108
):
109
+ logger .debug (
110
+ "Excluding {} because it is explicitly excluded by nested ignore." ,
111
+ p ,
112
+ )
96
113
continue
97
114
98
115
yield p
0 commit comments