[Python-checkins] r61263 - in python/trunk: Doc/distutils/sourcedist.rst Lib/distutils/command/sdist.py

georg.brandl python-checkins at python.org
Thu Mar 6 07:47:18 CET 2008


Author: georg.brandl
Date: Thu Mar  6 07:47:18 2008
New Revision: 61263

Modified:
   python/trunk/Doc/distutils/sourcedist.rst
   python/trunk/Lib/distutils/command/sdist.py
Log:
#1725737: ignore other VC directories other than CVS and SVN's too.


Modified: python/trunk/Doc/distutils/sourcedist.rst
==============================================================================
--- python/trunk/Doc/distutils/sourcedist.rst	(original)
+++ python/trunk/Doc/distutils/sourcedist.rst	Thu Mar  6 07:47:18 2008
@@ -122,7 +122,8 @@
 
 * all files in the Distutils "build" tree (default :file:`build/`)
 
-* all files in directories named :file:`RCS`, :file:`CVS` or :file:`.svn`
+* all files in directories named :file:`RCS`, :file:`CVS`, :file:`.svn`,
+  :file:`.hg`, :file:`.git`, :file:`.bzr` or :file:`_darcs`
 
 Now we have our complete list of files, which is written to the manifest for
 future reference, and then used to build the source distribution archive(s).
@@ -156,8 +157,9 @@
    previous two steps, so it's important that the ``prune`` command in the manifest
    template comes after the ``recursive-include`` command
 
-#. exclude the entire :file:`build` tree, and any :file:`RCS`, :file:`CVS` and
-   :file:`.svn` directories
+#. exclude the entire :file:`build` tree, and any :file:`RCS`, :file:`CVS`,
+   :file:`.svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` and :file:`_darcs`
+   directories
 
 Just like in the setup script, file and directory names in the manifest template
 should always be slash-separated; the Distutils will take care of converting

Modified: python/trunk/Lib/distutils/command/sdist.py
==============================================================================
--- python/trunk/Lib/distutils/command/sdist.py	(original)
+++ python/trunk/Lib/distutils/command/sdist.py	Thu Mar  6 07:47:18 2008
@@ -347,14 +347,14 @@
           * the build tree (typically "build")
           * the release tree itself (only an issue if we ran "sdist"
             previously with --keep-temp, or it aborted)
-          * any RCS, CVS and .svn directories
+          * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories
         """
         build = self.get_finalized_command('build')
         base_dir = self.distribution.get_fullname()
 
         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)/.*', is_regex=1)
+        self.filelist.exclude_pattern(r'(^|/)(RCS|CVS|\.svn|\.hg|\.git|\.bzr|_darcs)/.*', is_regex=1)
 
 
     def write_manifest (self):


More information about the Python-checkins mailing list