aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrapper/bootstrap.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/bootstrapper/bootstrap.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/bootstrapper/bootstrap.py')
-rw-r--r--python/servo/bootstrapper/bootstrap.py40
1 files changed, 0 insertions, 40 deletions
diff --git a/python/servo/bootstrapper/bootstrap.py b/python/servo/bootstrapper/bootstrap.py
deleted file mode 100644
index 4cd1fc7bc5c..00000000000
--- a/python/servo/bootstrapper/bootstrap.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this file,
-# You can obtain one at http://mozilla.org/MPL/2.0/.
-
-from __future__ import print_function
-
-import sys
-
-from windows_gnu import WindowsGnuBootstrapper
-from windows_msvc import WindowsMsvcBootstrapper
-
-
-class Bootstrapper(object):
- """Main class that performs system bootstrap."""
-
- def __init__(self, context):
- self.instance = None
- cls = None
- args = {}
-
- if sys.platform.startswith('msys'):
- cls = WindowsGnuBootstrapper
-
- elif sys.platform.startswith('win32'):
- cls = WindowsMsvcBootstrapper
-
- if cls is None:
- sys.exit('Bootstrap support is not yet available for your OS.')
-
- self.instance = cls(**args)
- self.instance.context = context
-
- def bootstrap(self, interactive=False, force=False):
- self.instance.interactive = interactive
- self.instance.force = force
-
- if force:
- self.instance.install_system_packages()
- else:
- self.instance.ensure_system_packages()