remove `for_XXX` functions from mesonlib

All uses now use `env.machines.YYY.is_XXX` instead.
pull/4010/head
John Ericson 6 years ago committed by John Ericson
parent 2ddb1af294
commit 8a09434cd4
  1. 70
      mesonbuild/mesonlib.py

@ -463,76 +463,6 @@ def is_dragonflybsd() -> bool:
def is_freebsd() -> bool: def is_freebsd() -> bool:
return platform.system().lower() == 'freebsd' return platform.system().lower() == 'freebsd'
def for_windows(env):
"""
Host machine is windows?
Deprecated: Please use `env.machines.host.is_windows()`.
Note: 'host' is the machine on which compiled binaries will run
"""
return env.machines.host.is_windows()
def for_cygwin(env):
"""
Host machine is cygwin?
Deprecated: Please use `env.machines.host.is_cygwin()`.
Note: 'host' is the machine on which compiled binaries will run
"""
return env.machines.host.is_cygwin()
def for_linux(env):
"""
Host machine is linux?
Deprecated: Please use `env.machines.host.is_linux()`.
Note: 'host' is the machine on which compiled binaries will run
"""
return env.machines.host.is_linux()
def for_darwin(env):
"""
Host machine is Darwin (iOS/OS X)?
Deprecated: Please use `env.machines.host.is_darwin()`.
Note: 'host' is the machine on which compiled binaries will run
"""
return env.machines.host.is_darwin()
def for_android(env):
"""
Host machine is Android?
Deprecated: Please use `env.machines.host.is_android()`.
Note: 'host' is the machine on which compiled binaries will run
"""
return env.machines.host.is_android()
def for_haiku(env):
"""
Host machine is Haiku?
Deprecated: Please use `env.machines.host.is_haiku()`.
Note: 'host' is the machine on which compiled binaries will run
"""
return env.machines.host.is_haiku()
def for_openbsd(env):
"""
Host machine is OpenBSD?
Deprecated: Please use `env.machines.host.is_openbsd()`.
Note: 'host' is the machine on which compiled binaries will run
"""
return env.machines.host.is_openbsd()
def exe_exists(arglist: List[str]) -> bool: def exe_exists(arglist: List[str]) -> bool:
try: try:
if subprocess.run(arglist, timeout=10).returncode == 0: if subprocess.run(arglist, timeout=10).returncode == 0:

Loading…
Cancel
Save