aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-05-27 08:24:27 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-05-27 12:31:06 +0200
commit3fcff73f4db85f16577c2032c3b12e7c4262dd74 (patch)
treee43087bf1ce648100173ea4e5b1023c4a6fcc428 /python/servo/command_base.py
parentae23298403cd5ebcade7b3e6b1a0ce162ffecd1e (diff)
downloadservo-3fcff73f4db85f16577c2032c3b12e7c4262dd74.tar.gz
servo-3fcff73f4db85f16577c2032c3b12e7c4262dd74.zip
Only check the GStreamer installation when building
Instead of always checking whether GStreamer is installed in mach's `build_env`, only do this when actually building. Also, use the instance variable to find features and look for the "media-gstreamer" feature instead of looking for !"media-dummy." Fixes #29797.
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 268422fa38f..2b5d47c90bd 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -522,13 +522,14 @@ class CommandBase(object):
'vcdir': vcinstalldir,
}
- def build_env(self, hosts_file_path=None, is_build=False, test_unit=False, features=None):
+ def build_env(self, hosts_file_path=None, is_build=False, test_unit=False):
"""Return an extended environment dictionary."""
env = os.environ.copy()
- if not features or "media-dummy" not in features:
+ if "media-dummy" not in self.features:
servo.platform.get().set_gstreamer_environment_variables_if_necessary(
- env, cross_compilation_target=self.cross_compile_target)
+ env, cross_compilation_target=self.cross_compile_target,
+ check_installation=is_build)
if sys.platform == "win32" and type(env['PATH']) == six.text_type:
# On win32, the virtualenv's activate_this.py script sometimes ends up