diff --git a/litex/soc/integration/builder.py b/litex/soc/integration/builder.py index e5543e0ba..692bfd44c 100644 --- a/litex/soc/integration/builder.py +++ b/litex/soc/integration/builder.py @@ -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.