Skip to content

Commit

Permalink
specifically check for yes|no in configure scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroge committed Oct 29, 2024
1 parent 3671c5b commit 6b7efa9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions easybuild/easyblocks/s/score_p.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,17 @@
@author: Alexander Grund (TU Dresden)
@author: Christian Feld (Juelich Supercomputing Centre)
"""
import glob
import os

from easybuild.tools import LooseVersion

import easybuild.tools.toolchain as toolchain
from easybuild.easyblocks.generic.configuremake import ConfigureMake
from easybuild.tools import LooseVersion
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.environment import unset_env_vars
from easybuild.tools.filetools import apply_regex_substitutions
from easybuild.tools.modules import get_software_root, get_software_libdir


Expand All @@ -48,6 +54,16 @@ class EB_Score_minus_P(ConfigureMake):

def configure_step(self, *args, **kwargs):
"""Configure the build, set configure options for compiler, MPI and dependencies."""

if LooseVersion(self.version) >= LooseVersion('8.0') and LooseVersion(self.version) < LooseVersion('8.5'):
# Let configure scripts specifically check for yes|no instead of *yes*|*no*,
# to prevent errors for certain dependencies installed in a path that includes "yes" or "no"
# see https://gitlab.com/score-p/scorep/-/issues/1008
yes_no_regex = (r'\*yes\*\|\*no\*', r'yes|no')
configure_scripts = glob.glob(os.path.join(self.start_dir, 'build-*', 'configure'))
for configure_script in configure_scripts:
apply_regex_substitutions(configure_script, [yes_no_regex])

# Remove some settings from the environment, as they interfere with
# Score-P's configure magic...
unset_env_vars(['CPPFLAGS', 'LDFLAGS', 'LIBS'])
Expand Down

0 comments on commit 6b7efa9

Please sign in to comment.