Skip to content

Commit

Permalink
Use is_linux to check for current platform instead of relying on sys.…
Browse files Browse the repository at this point in the history
…platform
  • Loading branch information
marmeladema committed Dec 10, 2019
1 parent 17233f2 commit 02c55e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/servo/command_base.py
Expand Up @@ -258,7 +258,7 @@ def gstreamer_root(target, env, topdir=None):
return env.get(gst_env)
elif os.path.exists(path.join(gst_default_path, "bin", "ffi-7.dll")):
return gst_default_path
elif sys.platform == "linux2":
elif is_linux():
return path.join(topdir, "support", "linux", "gstreamer", "gst")
return None

Expand Down Expand Up @@ -580,7 +580,7 @@ def needs_gstreamer_env(self, target, env, uwp=False, features=[]):
if "x86_64" not in effective_target or "android" in effective_target:
# We don't build gstreamer for non-x86_64 / android yet
return False
if sys.platform == "linux2" or is_windows():
if is_linux() or is_windows():
if path.isdir(gstreamer_root(effective_target, env, self.get_top_dir())):
return True
else:
Expand Down Expand Up @@ -690,7 +690,7 @@ def build_env(self, hosts_file_path=None, target=None, is_build=False, test_unit
extra_lib = [libpath] + extra_lib
append_to_path_env(path.join(libpath, "pkgconfig"), env, "PKG_CONFIG_PATH")

if sys.platform == "linux2":
if is_linux():
distrib, version, _ = distro.linux_distribution()
distrib = six.ensure_str(distrib)
version = six.ensure_str(version)
Expand Down

0 comments on commit 02c55e2

Please sign in to comment.