diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-11-02 15:07:35 (GMT) |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-11-02 15:07:35 (GMT) |
commit | bd26d86d7458897b681b3a5d614cfd6e42eb70cb (patch) | |
tree | 988202b8980d9cff1eb29b6f3ea8fb515217d16a | |
parent | 93912b9e542f90c2700a0560e127b6de5c36dcf0 (diff) | |
download | cpython-bd26d86d7458897b681b3a5d614cfd6e42eb70cb.zip cpython-bd26d86d7458897b681b3a5d614cfd6e42eb70cb.tar.gz cpython-bd26d86d7458897b681b3a5d614cfd6e42eb70cb.tar.bz2 |
Issue #19286: [distutils] Only match files in build_py.find_data_files.
-rw-r--r-- | 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 index 1371b3d..d48eb69 100644 --- a/Lib/distutils/command/build_py.py +++ b/Lib/distutils/command/build_py.py @@ -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): |