From 60a1503b2997b05e3f36f4ce92d688df44fdeae7 Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Fri, 13 Jan 2017 23:11:34 -0500 Subject: Clean up and simplify existing `mach bootstrap` - Default to interactive mode and remove the `--interactive` flag - Use `--force` to skip interactivity - Change MSVC dependency storage organization on disk: put each version into its own folder and directly refer to the versioned folders, providing immutability and making the installation list redundant - Reuse `host_triple()` function to fix broken bootstrapper dispatching - Simplify code: - Remove or inline many unused and redudant functions and variables - Prefer plain functions to classes - Consolidate into fewer files, remove unnecessary bootstrapper/ dir - Improve Python style - Sort dependency list --- python/servo/bootstrap_commands.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'python/servo/bootstrap_commands.py') diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 9128c1dccff..8975f174d84 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -7,7 +7,7 @@ # option. This file may not be copied, modified, or distributed # except according to those terms. -from __future__ import print_function, unicode_literals +from __future__ import absolute_import, print_function, unicode_literals import base64 import json @@ -24,6 +24,7 @@ from mach.decorators import ( Command, ) +import servo.bootstrap as bootstrap from servo.command_base import CommandBase, BIN_SUFFIX from servo.util import download_bytes, download_file, extract, host_triple @@ -44,17 +45,11 @@ class MachCommands(CommandBase): @Command('bootstrap', description='Install required packages for building.', category='bootstrap') - @CommandArgument('--interactive', "-i", - action='store_true', - help='Need to answer any (Y/n) interactive prompts.') @CommandArgument('--force', '-f', action='store_true', - help='Force reinstall packages') - def bootstrap(self, interactive=False, force=False): - from servo.bootstrapper.bootstrap import Bootstrapper - - bootstrapper = Bootstrapper(self.context) - bootstrapper.bootstrap(interactive=interactive, force=force) + help='Boostrap without confirmation') + def bootstrap(self, force=False): + return bootstrap.bootstrap(self.context, force=force) @Command('bootstrap-rust', description='Download the Rust compiler', -- cgit v1.2.3