summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/bdist_dumb.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-03-31 05:22:47 (GMT)
committerGreg Ward <gward@python.net>2000-03-31 05:22:47 (GMT)
commitb4c850c928eb2783f8345b1c642e153f4cd3aed9 (patch)
tree8fc9ab857275457c376971eabdcbd3c38b5e0462 /Lib/distutils/command/bdist_dumb.py
parente5796fecc62935513ec2053540f741d0b8cb0920 (diff)
downloadcpython-b4c850c928eb2783f8345b1c642e153f4cd3aed9.zip
cpython-b4c850c928eb2783f8345b1c642e153f4cd3aed9.tar.gz
cpython-b4c850c928eb2783f8345b1c642e153f4cd3aed9.tar.bz2
Added code to blow away the pseudo-installation tree and a 'keep_tree'
option to disable this (by default, it's false and we clean up).
Diffstat (limited to 'Lib/distutils/command/bdist_dumb.py')
-rw-r--r--Lib/distutils/command/bdist_dumb.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/Lib/distutils/command/bdist_dumb.py b/Lib/distutils/command/bdist_dumb.py
index 4383a8f..5456e57 100644
--- a/Lib/distutils/command/bdist_dumb.py
+++ b/Lib/distutils/command/bdist_dumb.py
@@ -10,7 +10,7 @@ __revision__ = "$Id$"
import os
from distutils.core import Command
-from distutils.util import get_platform, create_tree
+from distutils.util import get_platform, create_tree, remove_tree
class bdist_dumb (Command):
@@ -19,6 +19,9 @@ class bdist_dumb (Command):
user_options = [('format=', 'f',
"archive format to create (tar, ztar, gztar, zip)"),
+ ('keep-tree', 'k',
+ "keep the pseudo-installation tree around after " +
+ "creating the distribution archive"),
]
default_format = { 'posix': 'gztar',
@@ -27,6 +30,7 @@ class bdist_dumb (Command):
def initialize_options (self):
self.format = None
+ self.keep_tree = 0
# initialize_options()
@@ -68,9 +72,14 @@ class bdist_dumb (Command):
# pseudo-installation tree.
archive_basename = "%s.%s" % (self.distribution.get_full_name(),
get_platform())
+ print "output_dir = %s" % output_dir
+ print "self.format = %s" % self.format
self.make_archive (archive_basename, self.format,
root_dir=output_dir)
+ if not self.keep_tree:
+ remove_tree (output_dir, self.verbose, self.dry_run)
+
# run()