diff Lib/distutils/command/install_scripts.py @ 14540:35ae8dff8ed0 legacy-trunk

Added --force (-f) option to force installation (including bytecode compilation).
author Greg Ward <gward@python.net>
date Wed, 13 Sep 2000 01:02:25 +0000
parents b91b35c1d4c0
children b1f220f636ed
line wrap: on
line diff
--- a/Lib/distutils/command/install_scripts.py	Wed Sep 13 00:44:09 2000 +0000
+++ b/Lib/distutils/command/install_scripts.py	Wed Sep 13 01:02:25 2000 +0000
@@ -18,11 +18,13 @@
     user_options = [
         ('install-dir=', 'd', "directory to install scripts to"),
         ('build-dir=','b', "build directory (where to install from)"),
+        ('force', 'f', "force installation (overwrite existing files)"),
         ('skip-build', None, "skip the build steps"),
     ]
 
     def initialize_options (self):
         self.install_dir = None
+        self.force = 0
         self.build_dir = None
         self.skip_build = None
 
@@ -30,13 +32,14 @@
         self.set_undefined_options('build', ('build_scripts', 'build_dir'))
         self.set_undefined_options ('install',
                                     ('install_scripts', 'install_dir'),
+                                    ('force', 'force'),
                                     ('skip_build', 'skip_build'),
                                    )
 
     def run (self):
         if not self.skip_build:
             self.run_command('build_scripts')
-        self.outfiles = self.copy_tree (self.build_dir, self.install_dir)
+        self.outfiles = self.copy_tree(self.build_dir, self.install_dir)
         if os.name == 'posix':
             # Set the executable bits (owner, group, and world) on
             # all the scripts we just installed.