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

jason.coombs python-checkins at python.org
Sat Nov 2 18:05:08 CET 2013


http://hg.python.org/cpython/rev/265d369ad3b9
changeset:   86860:265d369ad3b9
branch:      3.2
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
@@ -127,7 +127,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