Bug 1295784 - Use `when` instead of `condition` as an argument name in Python configure's pkg_check_modules for consistency. r=glandium
MozReview-Commit-ID: 61XglTI0BII
--- a/build/moz.configure/pkg.configure
+++ b/build/moz.configure/pkg.configure
@@ -13,41 +13,41 @@ def pkg_config_version(pkg_config):
return Version(check_cmd_output(pkg_config, '--version').rstrip())
# Locates the given module using pkg-config.
# - `var` determines the name of variables to set when the package is found.
# <var>_CFLAGS and <var>_LIBS are set with corresponding values.
# - `package_desc` package name and version requirement string, list of
# strings describing packages to locate, or depends function that will
# resolve to such a string or list of strings.
-# - `condition` a depends function that will determine whether to perform
+# - `when` a depends function that will determine whether to perform
# any checks (default is to always perform checks).
# - `allow_missing` If set, failure to fulfill the package description
# will not result in an error or logged message, and any error message
# will be returned to the caller.
# Returns `True` when the package description is fulfilled.
@template
-def pkg_check_modules(var, package_desc, condition=always,
+def pkg_check_modules(var, package_desc, when=always,
allow_missing=False):
if isinstance(package_desc, (tuple, list)):
package_desc = ' '.join(package_desc)
package_desc = dependable(package_desc)
- @depends_when(pkg_config, pkg_config_version, when=condition)
+ @depends_when(pkg_config, pkg_config_version, when=when)
def check_pkg_config(pkg_config, version):
min_version = '0.9.0'
if pkg_config is None:
die("*** The pkg-config script could not be found. Make sure it is\n"
"*** in your path, or set the PKG_CONFIG environment variable\n"
"*** to the full path to pkg-config.")
if version < min_version:
die("*** Your version of pkg-config is too old. You need version %s or newer.",
min_version)
- @depends_when(pkg_config, package_desc, when=condition)
+ @depends_when(pkg_config, package_desc, when=when)
@imports('subprocess')
@imports('sys')
@imports(_from='mozbuild.configure.util', _import='LineIO')
def package(pkg_config, package_desc):
# package_desc may start as a depends function, so we can't use
# @checking here.
log.info("checking for %s... " % package_desc)
with log.queue_debug():