diff options
Diffstat (limited to 'setuptools/command/sdist.py')
-rwxr-xr-x | setuptools/command/sdist.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 2aa1ee20..dc8d6773 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -8,6 +8,8 @@ import sys from setuptools import svn_utils from setuptools.compat import PY3 +from setuptools.utils import cs_path_exists + import pkg_resources READMES = ('README', 'README.rst', 'README.txt') @@ -146,7 +148,7 @@ class sdist(orig.sdist): alts = fn got_it = 0 for fn in alts: - if os.path.exists(fn): + if cs_path_exists(fn): got_it = 1 self.filelist.append(fn) break @@ -155,16 +157,17 @@ class sdist(orig.sdist): self.warn("standard file not found: should have one of " + ', '.join(alts)) else: - if os.path.exists(fn): + if cs_path_exists(fn): self.filelist.append(fn) else: self.warn("standard file '%s' not found" % fn) optional = ['test/test*.py', 'setup.cfg'] for pattern in optional: - files = list(filter(os.path.isfile, glob(pattern))) + files = list(filter(cs_path_exists, glob(pattern))) if files: - self.filelist.extend(files) + actual_fnames = map(os.path.normcase, files) + self.filelist.extend(actual_fnames) # getting python files if self.distribution.has_pure_modules(): |