From a3813327575e8875c8c3ed24b5f45a0b7ba64446 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 19 Jul 2024 19:43:54 +0100 Subject: [PATCH] build: Check for PyYAML in Meson build Closes: #11540 Fixes: ccc6442d6f05 ("u_format: Rewrite format table to use YAML") Part-of: (cherry picked from commit bed6e0d691c125eecfbd504ee96c5a4a6027418e) --- .pick_status.json | 2 +- meson.build | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 5d08b8431bb..7be1dbb8143 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -264,7 +264,7 @@ "description": "build: Check for PyYAML in Meson build", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "ccc6442d6f0539571c413222e0d6aadc78bc5d4d", "notes": null diff --git a/meson.build b/meson.build index bfef896e3e3..6172cab394e 100644 --- a/meson.build +++ b/meson.build @@ -952,6 +952,15 @@ if has_mako.returncode() != 0 error('Python (3.x) mako module >= 0.8.0 required to build mesa.') endif +has_yaml = run_command( + prog_python, '-c', + ''' +import yaml + ''', check: false) +if has_yaml.returncode() != 0 + error('Python (3.x) yaml module (PyYAML) required to build mesa.') +endif + if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6') error('When using GCC, version 4.4.6 or later is required.') endif