]> granicus.if.org Git - python/commitdiff
Issue #19286: [distutils] Only match files in build_py.find_data_files.
authorJason R. Coombs <jaraco@jaraco.com>
Sat, 2 Nov 2013 15:07:35 +0000 (11:07 -0400)
committerJason R. Coombs <jaraco@jaraco.com>
Sat, 2 Nov 2013 15:07:35 +0000 (11:07 -0400)
Lib/distutils/command/build_py.py

index 1371b3d6ff90b7060412ae1e68d34809d00aff5e..d48eb69900ec8e90a8e8882742b2cf223501b9bb 100644 (file)
@@ -127,7 +127,8 @@ class build_py (Command):
             # Each pattern has to be converted to a platform-specific path
             filelist = glob(os.path.join(src_dir, convert_path(pattern)))
             # 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
 
     def build_package_data(self):