From 8f0ac47db9fe2934725aa9c8a7b0089451ed033d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 22 May 2016 15:18:32 -0400 Subject: Filter non-files in find_data_files. Fixes #261. --- setuptools/command/build_py.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index 34f39037..23e8b31c 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -9,7 +9,7 @@ import distutils.errors import collections import itertools -from setuptools.extern.six.moves import map +from setuptools.extern.six.moves import map, filter try: from setuptools.lib2to3_ex import Mixin2to3 @@ -105,7 +105,7 @@ class build_py(orig.build_py, Mixin2to3): ) # flatten the expanded globs into an iterable of matches globs_matches = itertools.chain.from_iterable(globs_expanded) - glob_files = globs_matches + glob_files = filter(os.path.isfile, globs_matches) files = list(itertools.chain( self.manifest_files.get(package, []), glob_files, -- cgit v1.2.1