From 36fc898c556e89a388a9e45c940ad4693552bcb6 Mon Sep 17 00:00:00 2001 From: Simon Branford Date: Fri, 20 Dec 2024 13:04:12 +0000 Subject: [PATCH 1/2] remove use of deprecated `extract_errors_from_log` in `configuremake` --- easybuild/easyblocks/generic/configuremake.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyblocks/generic/configuremake.py b/easybuild/easyblocks/generic/configuremake.py index adbc12d385..af62797129 100644 --- a/easybuild/easyblocks/generic/configuremake.py +++ b/easybuild/easyblocks/generic/configuremake.py @@ -49,7 +49,7 @@ from easybuild.tools.config import source_paths, build_option, ERROR, IGNORE, WARN from easybuild.tools.filetools import CHECKSUM_TYPE_SHA256, adjust_permissions, compute_checksum, download_file from easybuild.tools.filetools import read_file, remove_file -from easybuild.tools.run import extract_errors_from_log, run_shell_cmd +from easybuild.tools.run import run_shell_cmd from easybuild.tools.utilities import nub # string that indicates that a configure script was generated by Autoconf @@ -338,8 +338,8 @@ def configure_step(self, cmd_prefix=''): raise EasyBuildError('Invalid value for `unrecognized_configure_options`: %s. Must be one of: ', action, ', '.join(valid_actions)) if action != IGNORE: - unrecognized_options_str = 'configure: WARNING: unrecognized options:' - unrecognized_options = extract_errors_from_log(res.output, unrecognized_options_str)[1] + unrecognized_options_str = "^configure: WARNING: unrecognized options:" + unrecognized_options = re.findall(rf"{unrecognized_options_str}.*", res.output, flags=re.I | re.M) # Keep only unique options (remove the warning string and strip whitespace) unrecognized_options = nub(x.split(unrecognized_options_str)[-1].strip() for x in unrecognized_options) if unrecognized_options: From f875f97de0ad3da2228589572384ff680afe81b9 Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:25:41 +0000 Subject: [PATCH 2/2] removing unneeded change --- easybuild/easyblocks/generic/configuremake.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/generic/configuremake.py b/easybuild/easyblocks/generic/configuremake.py index af62797129..c20563228b 100644 --- a/easybuild/easyblocks/generic/configuremake.py +++ b/easybuild/easyblocks/generic/configuremake.py @@ -338,8 +338,8 @@ def configure_step(self, cmd_prefix=''): raise EasyBuildError('Invalid value for `unrecognized_configure_options`: %s. Must be one of: ', action, ', '.join(valid_actions)) if action != IGNORE: - unrecognized_options_str = "^configure: WARNING: unrecognized options:" - unrecognized_options = re.findall(rf"{unrecognized_options_str}.*", res.output, flags=re.I | re.M) + unrecognized_options_str = 'configure: WARNING: unrecognized options:' + unrecognized_options = re.findall(rf"^{unrecognized_options_str}.*", res.output, flags=re.I | re.M) # Keep only unique options (remove the warning string and strip whitespace) unrecognized_options = nub(x.split(unrecognized_options_str)[-1].strip() for x in unrecognized_options) if unrecognized_options: