8000 Issue #19286: [distutils] Only match files in build_py.find_data_files. · python/cpython@bd26d86 · GitHub
[go: up one dir, main page]

Skip to content

Commit bd26d86

Browse files
committed
Issue #19286: [distutils] Only match files in build_py.find_data_files.
1 parent 93912b9 commit bd26d86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/distutils/command/build_py.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ def find_data_files(self, package, src_dir):
127127
# Each pattern has to be converted to a platform-specific path
128128
filelist = glob(os.path.join(src_dir, convert_path(pattern)))
129129
# Files that match more than one pattern are only added once
130-
files.extend([fn for fn in filelist if fn not in files])
130+
files.extend([fn for fn in filelist if fn not in files
131+
and os.path.isfile(fn)])
131132
return files
132133

133134
def build_package_data(self):

0 commit comments

Comments
 (0)
0