[Distutils] patch to make write_manifest respect dry_run

Harry Henry Gebel hgebel@inet.net
Tue, 25 Apr 2000 04:03:07 -0400

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Here is a patch that causes sdist.write_manifest() to respect the value of

Harry Henry Gebel, Senior Developer, Landon House SBS
West Dover Hundred, Delaware

"Why do you look for the living among the dead?
He is not here, but has risen." 
Luke 24:5 (NRSV)

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="dry_run.patch"

Index: distutils/command/sdist.py
RCS file: /projects/cvsroot/distutils/distutils/command/sdist.py,v
retrieving revision 1.16
diff -u -r1.16 sdist.py
--- sdist.py	2000/04/25 01:38:20	1.16
+++ sdist.py	2000/04/25 08:01:34
@@ -11,7 +11,8 @@
 from types import *
 from glob import glob
 from distutils.core import Command
-from distutils.util import newer, create_tree, remove_tree, native_path
+from distutils.util import newer, create_tree, remove_tree, native_path, \
+     write_file
 from distutils.archive_util import check_archive_formats
 from distutils.text_file import TextFile
 from distutils.errors import DistutilsExecError, DistutilsOptionError
@@ -447,10 +448,9 @@
            by 'find_defaults()' and 'read_template()') to the manifest file
            named by 'self.manifest'."""
-        manifest = open (self.manifest, "w")
-        for fn in self.files:
-            manifest.write (fn + '\n')
-        manifest.close ()
+        self.execute(write_file,
+                     (self.manifest, self.files),
+                     "Writing manifest file")
     # write_manifest ()