diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-06-22 00:28:54 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2023-06-22 11:14:00 +0200 |
commit | a57c49a4bb5d5bbb69d7250e43334fada621e9b0 (patch) | |
tree | 924e008ab3179995d68c7ac798700324d48c79a3 /python/servo/platform/macos.py | |
parent | 7aaad0aa7eac2d0c98ff17091013fda77359397d (diff) | |
download | servo-a57c49a4bb5d5bbb69d7250e43334fada621e9b0.tar.gz servo-a57c49a4bb5d5bbb69d7250e43334fada621e9b0.zip |
Implement `./mach bootstrap` for MacOS
Diffstat (limited to 'python/servo/platform/macos.py')
-rw-r--r-- | python/servo/platform/macos.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/python/servo/platform/macos.py b/python/servo/platform/macos.py index 0f5ca632b2f..38169e9a75a 100644 --- a/python/servo/platform/macos.py +++ b/python/servo/platform/macos.py @@ -54,6 +54,21 @@ class MacOS(Base): return False return True + def _platform_bootstrap(self, _cache_dir: str, force: bool) -> bool: + installed_something = False + try: + brewfile = os.path.join(util.SERVO_ROOT, "etc", "homebrew", "Brewfile") + output = subprocess.check_output( + ['brew', 'bundle', 'install', "--file", brewfile] + ).decode("utf-8") + print(output) + installed_something = "Installing" in output + except subprocess.CalledProcessError as e: + print("Could not run homebrew. Is it installed?") + raise e + installed_something |= self._platform_bootstrap_gstreamer(False) + return installed_something + def _platform_bootstrap_gstreamer(self, force: bool) -> bool: if not force and self.is_gstreamer_installed(cross_compilation_target=None): return False |