@@ -69,6 +69,8 @@ def __init__(self):
6969 self .robot = False
7070 self .software_list = []
7171 self .easyconfigs = [] # A list of easyconfig names. May or may not include .eb extension
72+ # A dict where keys are easyconfig names, values are dictionary of options that should be applied for that easyconfig
73+ self .ec_opts = {}
7274
7375 def compose_ec_filenames (self ):
7476 """Returns a list of all easyconfig names"""
@@ -171,7 +173,11 @@ def parse_by_easyconfigs(filepath, easyconfigs, easybuild_version=None, robot=Fa
171173 if len (easyconfig ) == 1 :
172174 # Get single key from dictionary 'easyconfig'
173175 easyconf_name = list (easyconfig .keys ())[0 ]
176+ # Add easyconfig name to the list
174177 easystack .easyconfigs .append (easyconf_name )
178+ # Add options to the ec_opts dict
179+ if 'options' in easyconfig [easyconf_name ].keys ():
180+ easystack .ec_opts [easyconf_name ] = easyconfig [easyconf_name ]['options' ]
175181 else :
176182 dict_keys = ', ' .join (easyconfig .keys ())
177183 msg = "Failed to parse easystack file: expected a dictionary with one key (the EasyConfig name). "
@@ -307,12 +313,16 @@ def parse_easystack(filepath):
307313
308314 easyconfig_names = easystack .compose_ec_filenames ()
309315
310- general_options = easystack .get_general_options ()
316+ # Disabled general options for now. We weren't using them, and first want support for EasyConfig-specific options.
317+ # Then, we need a method to resolve conflicts (specific options should win)
318+ # general_options = easystack.get_general_options()
311319
312320 _log .debug ("EasyStack parsed. Proceeding to install these Easyconfigs: %s" % ', ' .join (sorted (easyconfig_names )))
313- if len (general_options ) != 0 :
314- _log .debug ("General options for installation are: \n %s" % str (general_options ))
315- else :
316- _log .debug ("No general options were specified in easystack" )
317-
318- return easyconfig_names , general_options
321+ _log .debug ("Using EasyConfig specific options based on the following dict:" )
322+ _log .debug (easystack .ec_opts )
323+ # if len(general_options) != 0:
324+ # _log.debug("General options for installation are: \n%s" % str(general_options))
325+ # else:
326+ # _log.debug("No general options were specified in easystack")
327+
328+ return easyconfig_names , easystack .ec_opts
0 commit comments