aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap_commands.py
diff options
context:
space:
mode:
authorAneesh Agrawal <aneeshusa@gmail.com>2017-01-13 23:11:34 -0500
committerAneesh Agrawal <aneeshusa@gmail.com>2017-01-15 15:41:37 -0500
commit60a1503b2997b05e3f36f4ce92d688df44fdeae7 (patch)
treea2196ba44e6d3af41e28d322ff4dda7ffb59748b /python/servo/bootstrap_commands.py
parentef900cbdcb0e544639ae10b390a68da2afd8bcce (diff)
downloadservo-60a1503b2997b05e3f36f4ce92d688df44fdeae7.tar.gz
servo-60a1503b2997b05e3f36f4ce92d688df44fdeae7.zip
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
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r--python/servo/bootstrap_commands.py15
1 files changed, 5 insertions, 10 deletions
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',