mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
using clearer syntax
This commit is contained in:
parent
516144fef7
commit
d81780b8b0
1 changed files with 7 additions and 2 deletions
|
@ -358,8 +358,13 @@ class sdist (Command):
|
||||||
|
|
||||||
# pruning out vcs directories
|
# pruning out vcs directories
|
||||||
# both separators are used under win32
|
# both separators are used under win32
|
||||||
seps = sys.platform == 'win32' and r'/|\\' or '/'
|
if sys.platform == 'win32':
|
||||||
vcs_dirs = ['RCS', 'CVS', '\.svn', '\.hg', '\.git', '\.bzr', '_darcs']
|
seps = r'/|\\'
|
||||||
|
else:
|
||||||
|
seps = '/'
|
||||||
|
|
||||||
|
vcs_dirs = ['RCS', 'CVS', r'\.svn', r'\.hg', r'\.git', r'\.bzr',
|
||||||
|
'_darcs']
|
||||||
vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps)
|
vcs_ptrn = r'(^|%s)(%s)(%s).*' % (seps, '|'.join(vcs_dirs), seps)
|
||||||
self.filelist.exclude_pattern(vcs_ptrn, is_regex=1)
|
self.filelist.exclude_pattern(vcs_ptrn, is_regex=1)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue