From a0803dadd1074a75e75db9a506a0ef12f4b12e59 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Wed, 7 Feb 2024 13:32:28 +0000 Subject: [PATCH] replace `run_cmd` with `run_shell_cmd` in custom easyblock for pybind11 (`pybind11.py`) --- easybuild/easyblocks/p/pybind11.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/easyblocks/p/pybind11.py b/easybuild/easyblocks/p/pybind11.py index b0db8eec21..9bec91f207 100644 --- a/easybuild/easyblocks/p/pybind11.py +++ b/easybuild/easyblocks/p/pybind11.py @@ -34,7 +34,7 @@ import easybuild.tools.environment as env from easybuild.tools.build_log import EasyBuildError from easybuild.tools.filetools import change_dir -from easybuild.tools.run import run_cmd +from easybuild.tools.run import run_shell_cmd from easybuild.tools.modules import get_software_root @@ -86,10 +86,10 @@ def sanity_check_step(self): # since for extension the necessary modules should already be loaded at this point fake_mod_data = self.load_fake_module(purge=True) cmd = "%s -c 'import pybind11; print(pybind11.get_include())'" % self.python_cmd - out, ec = run_cmd(cmd, simple=False) - if ec: + res = run_shell_cmd(cmd, fail_on_error=False) + if res.exit_code: raise EasyBuildError("Failed to get pybind11 includes!") - python_include = out.strip() + python_include = res.output.strip() if not self.is_extension: self.clean_up_fake_module(fake_mod_data)