integration/builder: Add Meson install/version check.
This commit is contained in:
parent
f92a185109
commit
2a109c3a3e
|
@ -239,9 +239,23 @@ class Builder:
|
||||||
def _generate_rom_software(self, compile_bios=True):
|
def _generate_rom_software(self, compile_bios=True):
|
||||||
# Compile all software packages.
|
# Compile all software packages.
|
||||||
for name, src_dir in self.software_packages:
|
for name, src_dir in self.software_packages:
|
||||||
|
|
||||||
# Skip BIOS compilation when disabled.
|
# Skip BIOS compilation when disabled.
|
||||||
if name == "bios" and not compile_bios:
|
if name == "bios" and not compile_bios:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Check Meson install/version.
|
||||||
|
meson_present = (shutil.which("meson") is not None)
|
||||||
|
meson_version = [0, 0, 0]
|
||||||
|
meson_major_min = 0
|
||||||
|
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):
|
||||||
|
msg = "Unable to find valid Meson build system, please install it with:\n"
|
||||||
|
msg += "- pip3 install meson.\n"
|
||||||
|
raise OSError(msg)
|
||||||
|
|
||||||
# Compile software package.
|
# Compile software package.
|
||||||
dst_dir = os.path.join(self.software_dir, name)
|
dst_dir = os.path.join(self.software_dir, name)
|
||||||
makefile = os.path.join(src_dir, "Makefile")
|
makefile = os.path.join(src_dir, "Makefile")
|
||||||
|
|
Loading…
Reference in New Issue