Skip to content

Commit f1494b0

Browse files
committed
using TC_CONSTANT_SYSTEM instead of "SYSTEM", and comparing versionsuffix to None explicitly
1 parent e7bdbe0 commit f1494b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

easybuild/framework/easyconfig/tweak.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
from easybuild.framework.easyconfig.format.format import DEPENDENCY_PARAMETERS
5353
from easybuild.framework.easyconfig.parser import fetch_parameters_from_easyconfig
5454
from easybuild.framework.easyconfig.tools import alt_easyconfig_paths
55+
from easybuild.toolchains.compiler.systemcompiler import TC_CONSTANT_SYSTEM
5556
from easybuild.toolchains.gcccore import GCCcore
5657
from easybuild.tools.build_log import EasyBuildError, print_warning
5758
from easybuild.tools.config import build_option
@@ -1091,7 +1092,7 @@ def find_potential_version_mappings(dep, toolchain_mapping, versionsuffix_mappin
10911092
# Figure out the main versionsuffix (altered depending on toolchain in the loop below)
10921093
versionsuffix = dep.get('versionsuffix', '')
10931094
# If versionsuffix is equal to None, it should be put to empty string
1094-
if not versionsuffix:
1095+
if versionsuffix is None:
10951096
versionsuffix = ''
10961097
# If versionsuffix is in our mapping then we expect it to be updated
10971098
if versionsuffix in versionsuffix_mapping:
@@ -1141,7 +1142,7 @@ def find_potential_version_mappings(dep, toolchain_mapping, versionsuffix_mappin
11411142
tc_candidate = fetch_parameters_from_easyconfig(read_file(path), ['toolchain'])[0]
11421143
if isinstance(tc_candidate, dict) and tc_candidate['name'] == SYSTEM_TOOLCHAIN_NAME:
11431144
cand_paths_filtered += [path]
1144-
if isinstance(tc_candidate, string_type) and tc_candidate == "SYSTEM":
1145+
if isinstance(tc_candidate, string_type) and tc_candidate == TC_CONSTANT_SYSTEM:
11451146
cand_paths_filtered += [path]
11461147

11471148
cand_paths = cand_paths_filtered

0 commit comments

Comments
 (0)