aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/python.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/modules/python.py')
-rw-r--r--mesonbuild/modules/python.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 3bbccd1..864d7ab 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -410,6 +410,8 @@ class PythonExternalProgram(ExternalProgram):
# Sanity check, we expect to have something that at least quacks in tune
cmd = self.get_command() + ['-c', INTROSPECT_COMMAND]
p, stdout, stderr = mesonlib.Popen_safe(cmd)
+ if p.returncode != 0:
+ raise mesonlib.MesonException('Trying to introspect Python configuration failed.\n\n' + stdout + stderr)
try:
info = json.loads(stdout)
except json.JSONDecodeError: