mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
Added --force (-f) option to force installation (including bytecode
compilation).
This commit is contained in:
parent
1830b21186
commit
3a0310a328
5 changed files with 20 additions and 4 deletions
|
@ -18,11 +18,13 @@ class install_scripts (Command):
|
|||
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 @@ class install_scripts (Command):
|
|||
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue