Skip to content

Commit 0e30555

Browse files
committed
Backport of r61263:
#1725737: ignore other VC directories other than CVS and SVN's too.
1 parent bc89897 commit 0e30555

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

Doc/dist/dist.tex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,8 @@ \section{Specifying the files to distribute}
12131213
be included in the source distribution:
12141214
\begin{itemize}
12151215
\item all files in the Distutils ``build'' tree (default \file{build/})
1216-
\item all files in directories named \file{RCS}, \file{CVS} or \file{.svn}
1216+
\item all files in directories named \file{RCS}, \file{CVS}, \file{.svn},
1217+
\file{.hg}, \file{.git}, \file{.bzr}, or \file{\_darcs}
12171218
\end{itemize}
12181219
Now we have our complete list of files, which is written to the manifest
12191220
for future reference, and then used to build the source distribution
@@ -1246,7 +1247,8 @@ \section{Specifying the files to distribute}
12461247
\code{prune} command in the manifest template comes after the
12471248
\code{recursive-include} command
12481249
\item exclude the entire \file{build} tree, and any \file{RCS},
1249-
\file{CVS} and \file{.svn} directories
1250+
\file{CVS}, \file{.svn}, \file{.hg}, \file{.git}, \file{.bzr}, or
1251+
\file{\_darcs} directories
12501252
\end{enumerate}
12511253
Just like in the setup script, file and directory names in the manifest
12521254
template should always be slash-separated; the Distutils will take care

Lib/distutils/command/sdist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,14 @@ def prune_file_list (self):
347347
* the build tree (typically "build")
348348
* the release tree itself (only an issue if we ran "sdist"
349349
previously with --keep-temp, or it aborted)
350-
* any RCS, CVS and .svn directories
350+
* any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
351351
"""
352352
build = self.get_finalized_command('build')
353353
base_dir = self.distribution.get_fullname()
354354

355355
self.filelist.exclude_pattern(None, prefix=build.build_base)
356356
self.filelist.exclude_pattern(None, prefix=base_dir)
357-
self.filelist.exclude_pattern(r'/(RCS|CVS|\.svn)/.*', is_regex=1)
357+
self.filelist.exclude_pattern(r'(^|/)(RCS|CVS|\.svn|\.hg|\.git|\.bzr|_darcs)/.*', is_regex=1)
358358

359359

360360
def write_manifest (self):

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Core and builtins
1515
Library
1616
-------
1717

18+
- Bug #1725737: In distutil's sdist, exclude RCS, CVS etc. also in the
19+
root directory, and also exclude .hg, .git, .bzr, and _darcs.
20+
1821
- Bug #1389051: imaplib causes excessive memory fragmentation when reading
1922
large messages.
2023

0 commit comments

Comments
 (0)