diff options
author | der richter <der.richter@gmx.de> | 2019-03-30 10:49:43 +0100 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2019-04-02 01:43:54 +0300 |
commit | c90f083614ea9a0e46a73b35e6f1e804cec5ae77 (patch) | |
tree | 2c03c8d581502bedd56e855834dc5745e5067fb0 /waftools/checks | |
parent | a3e6b81305ea1e7bf78aec6a83b64fd6071a9440 (diff) | |
download | mpv-c90f083614ea9a0e46a73b35e6f1e804cec5ae77.tar.bz2 mpv-c90f083614ea9a0e46a73b35e6f1e804cec5ae77.tar.xz |
build: slightly adjust swift check output messages on fail
to make it consistent with the other checks and their output messages.
Diffstat (limited to 'waftools/checks')
-rw-r--r-- | waftools/checks/custom.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py index 678232cf2b..fe0c079df1 100644 --- a/waftools/checks/custom.py +++ b/waftools/checks/custom.py @@ -114,9 +114,13 @@ def check_cocoa(ctx, dependency_identifier): return res def check_swift(ctx, dependency_identifier): + minVer = StrictVersion("3.0") if ctx.env.SWIFT_VERSION: - ctx.add_optional_message(dependency_identifier, - 'version found: ' + str(ctx.env.SWIFT_VERSION)) - if StrictVersion(ctx.env.SWIFT_VERSION) >= StrictVersion("3.0"): + if StrictVersion(ctx.env.SWIFT_VERSION) >= minVer: + ctx.add_optional_message(dependency_identifier, + 'version found: ' + str(ctx.env.SWIFT_VERSION)) return True + ctx.add_optional_message(dependency_identifier, + "'swift >= " + str(minVer) + "' not found, found " + + str(ctx.env.SWIFT_VERSION or None)) return False |