diff -u -r1.35 sdist.py --- distutils/command/sdist.py 2000/06/24 01:23:37 1.35 +++ distutils/command/sdist.py 2000/06/28 09:31:53 @@ -217,7 +217,8 @@ if template_exists: self.read_template () - # Prune away the build and source distribution directories + # Prune away the build and source distribution directories and + # 'CVS' files and directories self.prune_file_list() # File list now complete -- sort it so that higher-level files @@ -510,14 +511,19 @@ def prune_file_list (self): """Prune off branches that might slip into the file list as created by 'read_template()', but really don't belong there: specifically, - the build tree (typically "build") and the release tree itself - (only an issue if we ran "sdist" previously with --keep-tree, or it - aborted). + the build tree (typically "build"), the release tree itself (only an + issue if we ran "sdist" previously with --keep-tree, or it aborted), + and 'CVS' directories. """ build = self.get_finalized_command('build') base_dir = self.distribution.get_fullname() self.exclude_pattern (self.files, None, prefix=build.build_base) self.exclude_pattern (self.files, None, prefix=base_dir) + # I couldn't make a self.exclude_pattern() call to do this, I should + # stop working on stuff at 5 in the morning + for counter in xrange (len (self.files) - 1, -1, -1): + if string.find (self.files[counter], 'CVS') != -1: + del self.files[counter] def select_pattern (self, files, pattern, anchor=1, prefix=None):