Skip to content

Commit

Permalink
Merge pull request #3171 from bartoldeman/20240207133228_new_pr_pybind11
Browse files Browse the repository at this point in the history
replace `run_cmd` with `run_shell_cmd` in custom easyblock for pybind11 (`pybind11.py`)
  • Loading branch information
branfosj authored Feb 8, 2024
2 parents aa264f6 + a0803da commit 0765bd2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions easybuild/easyblocks/p/pybind11.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 0765bd2

Please sign in to comment.