From 64e5de9fc8ff746565c77535d889cbed8a3de6a5 Mon Sep 17 00:00:00 2001 From: Johannes Rudolph Date: Tue, 23 Aug 2022 18:59:58 +0200 Subject: [PATCH] soc/integration/builder: more precise error message when meson is too old --- litex/soc/integration/builder.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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.