summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-05-28 23:47:00 (GMT)
committerGreg Ward <gward@python.net>2000-05-28 23:47:00 (GMT)
commit0eeebfda98301f60021727904e52459dbee602b0 (patch)
treef6644b5cdf7c473e0ecc517f908d741eef913a5c /Lib
parent9581144329e39787b1f584dc575b78f099710595 (diff)
downloadcpython-0eeebfda98301f60021727904e52459dbee602b0.zip
cpython-0eeebfda98301f60021727904e52459dbee602b0.tar.gz
cpython-0eeebfda98301f60021727904e52459dbee602b0.tar.bz2
Moved warnings out of 'finalize_options()' into 'run()'.
Added a warning for 'bdist_base' directory.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/command/clean.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/Lib/distutils/command/clean.py b/Lib/distutils/command/clean.py
index 62307a1..31147b5 100644
--- a/Lib/distutils/command/clean.py
+++ b/Lib/distutils/command/clean.py
@@ -34,13 +34,6 @@ class clean (Command):
self.all = None
def finalize_options(self):
- if self.build_lib and not os.path.exists (self.build_lib):
- self.warn ("'%s' does not exist -- can't clean it" %
- self.build_lib)
- if self.build_temp and not os.path.exists (self.build_temp):
- self.warn ("'%s' does not exist -- can't clean it" %
- self.build_temp)
-
self.set_undefined_options('build',
('build_base', 'build_base'),
('build_lib', 'build_lib'),
@@ -53,11 +46,21 @@ class clean (Command):
# gone)
if os.path.exists (self.build_temp):
remove_tree (self.build_temp, self.verbose, self.dry_run)
+ else:
+ self.warn ("'%s' does not exist -- can't clean it" %
+ self.build_temp)
+
+
+
if self.all:
# remove the module build directory (unless already gone)
if os.path.exists (self.build_lib):
remove_tree (self.build_lib, self.verbose, self.dry_run)
+ else:
+ self.warn ("'%s' does not exist -- can't clean it" %
+ self.build_lib)
+
# remove the temporary directory used for creating built
# distributions (default "build/bdist") -- eg. type of
# built distribution will have its own subdirectory under
@@ -65,6 +68,9 @@ class clean (Command):
# 'remove_tree()'.
if os.path.exists (self.bdist_base):
remove_tree (self.bdist_base, self.verbose, self.dry_run)
+ else:
+ self.warn ("'%s' does not exist -- can't clean it" %
+ self.bdist_base)
# just for the heck of it, try to remove the base build directory:
# we might have emptied it right now, but if not we don't care