summaryrefslogtreecommitdiff
path: root/Lib/distutils/command/build_py.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/command/build_py.py')
-rw-r--r--Lib/distutils/command/build_py.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
index 1371b3d6ff..d48eb69900 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):