Merge pull request #1405 from jrudolph/better-meson-error-msg

soc/integration/builder: more precise error message when meson is too old
This commit is contained in:
enjoy-digital 2022-08-24 19:36:23 +02:00 committed by GitHub
commit 50a5e137ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.