Issue #19286: [distutils] Only match files in build_py.find_data_files.

This commit is contained in:
Jason R. Coombs 2013-11-02 11:07:35 -04:00
parent 83aafda575
commit 3c0713550e
1 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,8 @@ class build_py(Command):
# Each pattern has to be converted to a platform-specific path # Each pattern has to be converted to a platform-specific path
filelist = glob(os.path.join(src_dir, convert_path(pattern))) filelist = glob(os.path.join(src_dir, convert_path(pattern)))
# Files that match more than one pattern are only added once # Files that match more than one pattern are only added once
files.extend([fn for fn in filelist if fn not in files]) files.extend([fn for fn in filelist if fn not in files
and os.path.isfile(fn)])
return files return files
def build_package_data(self): def build_package_data(self):