diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-01-04 00:07:14 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-01-04 00:07:14 (GMT) |
commit | 653cb62cd6824e749388ef240f3436a560fa1c85 (patch) | |
tree | ac6003fcfc2275ae68cf75f3fc36dc3aedd9debd /Lib/distutils/command | |
parent | 3b6ab50d3a3b238f93119e9fe14bbaa9197e512d (diff) | |
download | cpython-653cb62cd6824e749388ef240f3436a560fa1c85.zip cpython-653cb62cd6824e749388ef240f3436a560fa1c85.tar.gz cpython-653cb62cd6824e749388ef240f3436a560fa1c85.tar.bz2 |
Merged revisions 68276 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68276 | tarek.ziade | 2009-01-04 01:04:49 +0100 (Sun, 04 Jan 2009) | 1 line
fixed #1702551: distutils sdist was not pruning VCS directories under win32
........
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r-- | Lib/distutils/command/sdist.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py index 961256c..e10e25b 100644 --- a/Lib/distutils/command/sdist.py +++ b/Lib/distutils/command/sdist.py @@ -7,6 +7,7 @@ Implements the Distutils 'sdist' command (create a source distribution).""" __revision__ = "$Id$" import os, string +import sys from types import * from glob import glob from distutils.core import Command @@ -354,8 +355,13 @@ class sdist (Command): self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) - self.filelist.exclude_pattern(r'(^|/)(RCS|CVS|\.svn|\.hg|\.git|\.bzr|_darcs)/.*', is_regex=1) + # pruning out vcs directories + # both separators are used under win32 + seps = sys.platform == 'win32' and r'/|\\' or '/' + vcs_dirs = ['RCS', 'CVS', '\.svn', '\.hg', '\.git', '\.bzr', '_darcs'] + vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps) + self.filelist.exclude_pattern(vcs_ptrn, is_regex=1) def write_manifest (self): """Write the file list in 'self.filelist' (presumably as filled in |