From b366a02318def70948f8ff6ed321e433b721ece4 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Sun, 4 Aug 2024 14:00:15 +0200 Subject: build: Speed up first run after build on macOS (#32928) GStreamer has to process plugins each time they are added when initializing. When those files have changed, this triggers macOS security protections which can add many seconds to access time. This change eliminates that problem after the first packaging of libraries by skipping packaging if everything is up-to-date and not overwriting the dylibs everytime. In addition, it moves a lot of the code for packaging GStreamer libraries on macOS into the `gstreamer` module and adds type-safety and comments to the Python. Signed-off-by: Martin Robinson --- python/servo/platform/macos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/servo/platform') diff --git a/python/servo/platform/macos.py b/python/servo/platform/macos.py index eeb2ee26c1c..de20fe35ad5 100644 --- a/python/servo/platform/macos.py +++ b/python/servo/platform/macos.py @@ -16,6 +16,7 @@ from .. import util from .base import Base URL_BASE = "https://github.com/servo/servo-build-deps/releases/download/macOS" +GSTREAMER_PLUGIN_VERSION = "1.22.3" GSTREAMER_URL = f"{URL_BASE}/gstreamer-1.0-1.22.3-universal.pkg" GSTREAMER_DEVEL_URL = f"{URL_BASE}/gstreamer-1.0-devel-1.22.3-universal.pkg" GSTREAMER_ROOT = "/Library/Frameworks/GStreamer.framework/Versions/1.0" @@ -34,7 +35,6 @@ class MacOS(Base): def is_gstreamer_installed(self, cross_compilation_target: Optional[str]) -> bool: # Servo only supports the official GStreamer distribution on MacOS. - # Make sure we use the right `pkg-config`. return not cross_compilation_target and os.path.exists(GSTREAMER_ROOT) def _platform_bootstrap(self, _force: bool) -> bool: -- cgit v1.2.3