From 8a09434cd4e171001bb649989d520112a58c9123 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 4 Oct 2018 20:52:08 -0400 Subject: [PATCH] remove `for_XXX` functions from mesonlib All uses now use `env.machines.YYY.is_XXX` instead. --- mesonbuild/mesonlib.py | 70 ------------------------------------------ 1 file changed, 70 deletions(-) diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 1b07d85a2..d052a2b69 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -463,76 +463,6 @@ def is_dragonflybsd() -> bool: def is_freebsd() -> bool: 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: try: if subprocess.run(arglist, timeout=10).returncode == 0: