Skip to content

Commit 09a119a

Browse files
authored
Print meson output in case of error during editable rebuild
1 parent 5e4a9b6 commit 09a119a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

mesonpy/_editable.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,9 @@ def _rebuild(self) -> Node:
344344
else:
345345
subprocess.run(self._build_cmd, cwd=self._build_path, env=env, stdout=subprocess.DEVNULL, check=True)
346346
except subprocess.CalledProcessError as exc:
347-
raise ImportError(f're-building the {self._name} meson-python editable wheel package failed') from exc
347+
output = exc.output if exc.output is not None else exc.stdout
348+
raise ImportError(f're-building the {self._name} meson-python editable wheel package failed with: \n{output.decode(errors="replace")}') from exc
349+
348350

349351
install_plan_path = os.path.join(self._build_path, 'meson-info', 'intro-install_plan.json')
350352
with open(install_plan_path, 'r', encoding='utf8') as f:

0 commit comments

Comments
 (0)