[Python-checkins] cpython (2.7): Issue #19286: [distutils] Only match files in build_py.find_data_files.

jason.coombs python-checkins at python.org
Sat Nov 2 16:58:19 CET 2013


http://hg.python.org/cpython/rev/0a1cf947eff6
changeset:   86847:0a1cf947eff6
branch:      2.7
user:        Jason R. Coombs <jaraco at jaraco.com>
date:        Sat Nov 02 11:07:35 2013 -0400
summary:
  Issue #19286: [distutils] Only match files in build_py.find_data_files.

files:
  Lib/distutils/command/build_py.py |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
--- a/Lib/distutils/command/build_py.py
+++ b/Lib/distutils/command/build_py.py
@@ -128,7 +128,8 @@
             # 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):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list