aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-04-29 17:29:11 +0200
committerGitHub <noreply@github.com>2024-04-29 15:29:11 +0000
commit4a12c0630927be1ffdedd8f1329081a09337aa1e (patch)
tree5566bda1ada9018e55ee8b5dad355fb3a386170c /python/servo
parent3014e201ab9d7f189a496a4c3c97467e85779f83 (diff)
downloadservo-4a12c0630927be1ffdedd8f1329081a09337aa1e.tar.gz
servo-4a12c0630927be1ffdedd8f1329081a09337aa1e.zip
bootstrap: Add a `--skip-platform` option (#32176)
This allows installign `taplo` and `crown` when you are installing dependencies manually.
Diffstat (limited to 'python/servo')
-rw-r--r--python/servo/bootstrap_commands.py7
-rw-r--r--python/servo/platform/base.py6
2 files changed, 9 insertions, 4 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index 33d3b20aa2f..3545de3a82d 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -40,12 +40,15 @@ class MachCommands(CommandBase):
@CommandArgument('--force', '-f',
action='store_true',
help='Boostrap without confirmation')
- def bootstrap(self, force=False):
+ @CommandArgument('--skip-platform',
+ action='store_true',
+ help='Skip platform bootstrapping.')
+ def bootstrap(self, force=False, skip_platform=False):
# Note: This entry point isn't actually invoked by ./mach bootstrap.
# ./mach bootstrap calls mach_bootstrap.bootstrap_command_only so that
# it can install dependencies without needing mach's dependencies
try:
- servo.platform.get().bootstrap(force)
+ servo.platform.get().bootstrap(force, skip_platform)
except NotImplementedError as exception:
print(exception)
return 1
diff --git a/python/servo/platform/base.py b/python/servo/platform/base.py
index e6d3e955cda..7333c7dc4ae 100644
--- a/python/servo/platform/base.py
+++ b/python/servo/platform/base.py
@@ -54,10 +54,12 @@ class Base:
except FileNotFoundError:
return False
- def bootstrap(self, force: bool):
- installed_something = self._platform_bootstrap(force)
+ def bootstrap(self, force: bool, skip_platform: bool):
+ if not skip_platform:
+ installed_something = self._platform_bootstrap(force)
installed_something |= self.install_taplo(force)
installed_something |= self.install_crown(force)
+
if not installed_something:
print("Dependencies were already installed!")