build: slightly adjust swift check output messages on fail

to make it consistent with the other checks and their output messages.
This commit is contained in:
der richter 2019-03-30 10:49:43 +01:00 committed by Jan Ekström
parent a3e6b81305
commit c90f083614
1 changed files with 7 additions and 3 deletions

View File

@ -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