[Python-checkins] CVS: distutils/distutils/command clean.py,1.6,1.7

Greg Ward python-dev@python.org
Sun, 28 May 2000 16:47:02 -0700


Update of /cvsroot/python/distutils/distutils/command
In directory slayer.i.sourceforge.net:/tmp/cvs-serv10205

Modified Files:
	clean.py 
Log Message:
Moved warnings out of 'finalize_options()' into 'run()'.
Added a warning for 'bdist_base' directory.

Index: clean.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/clean.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** clean.py	2000/05/25 01:10:04	1.6
--- clean.py	2000/05/28 23:47:00	1.7
***************
*** 5,9 ****
  # contributed by Bastian Kleineidam <calvin@cs.uni-sb.de>, added 2000-03-18
  
! __revision__ = "$Id: clean.py,v 1.6 2000/05/25 01:10:04 gward Exp $"
  
  import os
--- 5,9 ----
  # contributed by Bastian Kleineidam <calvin@cs.uni-sb.de>, added 2000-03-18
  
! __revision__ = "$Id: clean.py,v 1.7 2000/05/28 23:47:00 gward Exp $"
  
  import os
***************
*** 35,45 ****
  
      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'),
--- 35,38 ----
***************
*** 54,62 ****
--- 47,65 ----
          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
***************
*** 66,69 ****
--- 69,75 ----
              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: