Skip to content

Commit 8f3e439

Browse files
committed
Make the parser already add the .eb suffix if it is not there. This is neededso that the keys in the option dictionary can be expected to be the full EasyConfig names
1 parent c285824 commit 8f3e439

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

easybuild/framework/easystack.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,7 @@ def compose_ec_filenames(self):
8989

9090
# entries specified via 'easyconfigs' top-level key
9191
for ec in self.easyconfigs:
92-
if not ec.endswith('.eb'):
93-
ec_filenames.append(ec + '.eb')
94-
else:
95-
ec_filenames.append(ec)
92+
ec_filenames.append(ec)
9693
return ec_filenames
9794

9895
# flags applicable to all sw (i.e. robot)
@@ -169,12 +166,16 @@ def parse_by_easyconfigs(filepath, easyconfigs, easybuild_version=None, robot=Fa
169166

170167
for easyconfig in easyconfigs:
171168
if isinstance(easyconfig, str):
169+
if not easyconfig.endswith('.eb'):
170+
easyconfig = easyconfig + '.eb'
172171
easystack.easyconfigs.append(easyconfig)
173172
elif isinstance(easyconfig, dict):
174173
if len(easyconfig) == 1:
175174
# Get single key from dictionary 'easyconfig'
176175
easyconf_name = list(easyconfig.keys())[0]
177176
# Add easyconfig name to the list
177+
if not easyconf_name.endswith('.eb'):
178+
easyconf_name = easyconf_name + '.eb'
178179
easystack.easyconfigs.append(easyconf_name)
179180
# Add options to the ec_opts dict
180181
if 'options' in easyconfig[easyconf_name].keys():

0 commit comments

Comments
 (0)