soc/integration/builder: more precise error message when meson is too old

This commit is contained in:
Johannes Rudolph 2022-08-23 18:59:58 +02:00
parent 01754a82c8
commit 64e5de9fc8
No known key found for this signature in database
GPG Key ID: 52AF1C9ABD77E6E5
1 changed files with 6 additions and 1 deletions

View File

@ -257,10 +257,15 @@ class Builder:
meson_minor_min = 59
if meson_present:
meson_version = subprocess.check_output(["meson", "-v"]).decode("utf-8").split(".")
if (not meson_present) or (int(meson_version[0]) < meson_major_min) or (int(meson_version[1]) < meson_minor_min):
if (not meson_present):
msg = "Unable to find valid Meson build system, please install it with:\n"
msg += "- pip3 install meson.\n"
raise OSError(msg)
if (int(meson_version[0]) < meson_major_min) or (int(meson_version[1]) < meson_minor_min):
msg = f"Meson version to old. Found: {meson_version[0]}.{meson_version[1]}. Required: {meson_major_min}.{meson_minor_min}.\n"
msg += "Try updating with:\n"
msg += "- pip3 install -U meson.\n"
raise OSError(msg)
def _prepare_rom_software(self):
# Create directories for all software packages.