@@ -261,7 +261,7 @@ def det_subtoolchain_version(current_tc, subtoolchain_names, optional_toolchains
261261
262262 for subtoolchain_name in subtoolchain_names :
263263
264- uniq_subtc_versions = set ([ subtc ['version' ] for subtc in cands if subtc ['name' ] == subtoolchain_name ])
264+ uniq_subtc_versions = { subtc ['version' ] for subtc in cands if subtc ['name' ] == subtoolchain_name }
265265
266266 # system toolchain: bottom of the hierarchy
267267 if is_system_toolchain (subtoolchain_name ):
@@ -318,8 +318,8 @@ def get_toolchain_hierarchy(parent_toolchain, incl_capabilities=False):
318318 # obtain list of all possible subtoolchains
319319 _ , all_tc_classes = search_toolchain ('' )
320320 subtoolchains = {tc_class .NAME : getattr (tc_class , 'SUBTOOLCHAIN' , None ) for tc_class in all_tc_classes }
321- optional_toolchains = set ( tc_class .NAME for tc_class in all_tc_classes if getattr (tc_class , 'OPTIONAL' , False ))
322- composite_toolchains = set ( tc_class .NAME for tc_class in all_tc_classes if len (tc_class .__bases__ ) > 1 )
321+ optional_toolchains = { tc_class .NAME for tc_class in all_tc_classes if getattr (tc_class , 'OPTIONAL' , False )}
322+ composite_toolchains = { tc_class .NAME for tc_class in all_tc_classes if len (tc_class .__bases__ ) > 1 }
323323
324324 # the parent toolchain is at the top of the hierarchy,
325325 # we need a copy so that adding capabilities (below) doesn't affect the original object
@@ -1219,14 +1219,16 @@ def dependencies(self, build_only=False, runtime_only=False):
12191219
12201220 return retained_deps
12211221
1222- def dependency_names (self , build_only = False ):
1222+ def dependency_names (self , build_only = False , runtime_only = False ):
12231223 """
12241224 Return a set of names of all (direct) dependencies after filtering.
12251225 Iterable builddependencies are flattened when not iterating.
12261226
12271227 :param build_only: only return build dependencies, discard others
1228+ :param runtime_only: only return runtime dependencies, discard others
12281229 """
1229- return {dep ['name' ] for dep in self .dependencies (build_only = build_only ) if dep ['name' ]}
1230+ return {dep ['name' ] for dep in self .dependencies (build_only = build_only , runtime_only = runtime_only )
1231+ if dep ['name' ]}
12301232
12311233 def builddependencies (self ):
12321234 """
@@ -1279,7 +1281,7 @@ def toolchain(self):
12791281 else :
12801282 self .log .debug ("Found easyconfig for toolchain %s version %s: %s" , tcname , tcversion , tc_ecfile )
12811283 tc_ec = process_easyconfig (tc_ecfile )[0 ]
1282- tcdeps = tc_ec ['ec' ].dependencies ()
1284+ tcdeps = tc_ec ['ec' ].dependencies (runtime_only = True )
12831285 self .log .debug ("Toolchain dependencies based on easyconfig: %s" , tcdeps )
12841286
12851287 self ._toolchain = get_toolchain (self ['toolchain' ], self ['toolchainopts' ],
0 commit comments