Skip to content

Commit 53252e0

Browse files
author
ocaisa
committed
Merge pull request #4 from boegel/subtoolchain_searching
remove unused build_specs
2 parents 819ef97 + 9eb446d commit 53252e0

3 files changed

Lines changed: 12 additions & 17 deletions

File tree

easybuild/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def main(testing_data=(None, None, None)):
261261

262262
# dry_run: print all easyconfigs and dependencies, and whether they are already built
263263
if options.dry_run or options.dry_run_short:
264-
txt = dry_run(easyconfigs, short=not options.dry_run, build_specs=build_specs)
264+
txt = dry_run(easyconfigs, short=not options.dry_run)
265265
print_msg(txt, log=_log, silent=testing, prefix=False)
266266

267267
# cleanup and exit after dry run, searching easyconfigs or submitting regression test
@@ -281,8 +281,8 @@ def main(testing_data=(None, None, None)):
281281
if len(easyconfigs) > 0:
282282
if options.robot:
283283
print_msg("resolving dependencies ...", log=_log, silent=testing)
284-
#ordered_ecs = resolve_dependencies(easyconfigs, build_specs=build_specs)
285-
ordered_ecs = minimally_resolve_dependencies(easyconfigs, build_specs=build_specs)
284+
#ordered_ecs = resolve_dependencies(easyconfigs)
285+
ordered_ecs = minimally_resolve_dependencies(easyconfigs)
286286
else:
287287
ordered_ecs = easyconfigs
288288
else:

easybuild/tools/robot.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,19 @@ def det_robot_path(robot_paths_option, tweaked_ecs_path, pr_path, auto_robot=Fal
6565
return robot_path
6666

6767

68-
def dry_run(easyconfigs, short=False, build_specs=None):
68+
def dry_run(easyconfigs, short=False):
6969
"""
7070
Compose dry run overview for supplied easyconfigs ([ ] for unavailable, [x] for available, [F] for forced)
7171
@param easyconfigs: list of parsed easyconfigs (EasyConfig instances)
7272
@param short: use short format for overview: use a variable for common prefixes
73-
@param build_specs: dictionary specifying build specifications (e.g. version, toolchain, ...)
7473
"""
7574
lines = []
7675
if build_option('robot_path') is None:
7776
lines.append("Dry run: printing build status of easyconfigs")
7877
all_specs = easyconfigs
7978
else:
8079
lines.append("Dry run: printing build status of easyconfigs and dependencies")
81-
all_specs = resolve_dependencies(easyconfigs, build_specs=build_specs, retain_all_deps=True)
80+
all_specs = minimally_resolve_dependencies(easyconfigs, retain_all_deps=True)
8281

8382
unbuilt_specs = skip_available(all_specs)
8483
dry_run_fmt = " * [%1s] %s (module: %s)" # markdown compatible (list of items with checkboxes in front)
@@ -142,24 +141,21 @@ def replace_toolchain_with_hierarchy(item_specs, parent, retain_all_deps, use_an
142141

143142
# Look for a matching easyconfig starting from the bottom
144143

145-
def minimally_resolve_dependencies(unprocessed, build_specs=None, retain_all_deps=False, use_any_existing_modules=False):
144+
def minimally_resolve_dependencies(unprocessed, retain_all_deps=False, use_any_existing_modules=False):
146145
"""
147146
Work through the list of easyconfigs to determine an optimal order with minimal dependency resolution
148147
@param unprocessed: list of easyconfigs
149-
@param build_specs: dictionary specifying build specifications (e.g. version, toolchain, ...)
150148
@param retain_all_deps: boolean indicating whether all dependencies must be retained, regardless of availability
151149
"""
152150
if build_option('robot_path') is None:
153151
_log.info("No robot path : not (minimally) resolving dependencies")
154-
return resolve_dependencies(unprocessed,build_specs, retain_all_deps)
152+
return resolve_dependencies(unprocessed, retain_all_deps=retain_all_deps)
155153
else:
156154
# Look over all elements of the list individually
157155
for ec in unprocessed:
158-
item_specs = resolve_dependencies([ec], build_specs=build_specs, retain_all_deps=True)
159-
# Tweak the easyconfigs according to the build_specs
160-
# HOW DO I DO THIS CORRECTLY...motoring on assuming I successfully did this!
156+
item_specs = resolve_dependencies([ec], retain_all_deps=True)
161157

162-
# Now we have a complete list of the dependencies (updated with build_specs if necessary), let's do a
158+
# Now we have a complete list of the dependencies, let's do a
163159
# search/replace for the toolchain, removing existing elements from the list according to retain_all_deps
164160
item_specs = replace_toolchain_with_hierarchy(
165161
item_specs, parent=ec['name'],
@@ -173,13 +169,12 @@ def minimally_resolve_dependencies(unprocessed, build_specs=None, retain_all_dep
173169
if not next((x for x in item_specs[check:] if x['name'] == check['name']), False):
174170
_log.error("Conflicting dependency versions for %s easyconfig: %s" % ec['name'] % check['name'])
175171
# Finally, we pass our minimal list back through resolve_dependencies again to clean up the ordering
176-
return resolve_dependencies(minimal_list,build_specs=None, retain_all_deps=False)
172+
return resolve_dependencies(minimal_list, retain_all_deps=False)
177173

178-
def resolve_dependencies(unprocessed, build_specs=None, retain_all_deps=False):
174+
def resolve_dependencies(unprocessed, retain_all_deps=False):
179175
"""
180176
Work through the list of easyconfigs to determine an optimal order
181177
@param unprocessed: list of easyconfigs
182-
@param build_specs: dictionary specifying build specifications (e.g. version, toolchain, ...)
183178
@param retain_all_deps: boolean indicating whether all dependencies must be retained, regardless of availability;
184179
retain all deps when True, check matching build option when False
185180
"""

easybuild/tools/testing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def regtest(easyconfig_paths, build_specs=None):
117117
if build_option('sequential'):
118118
return build_easyconfigs(easyconfigs, output_dir, test_results)
119119
else:
120-
resolved = resolve_dependencies(easyconfigs, build_specs=build_specs)
120+
resolved = resolve_dependencies(easyconfigs)
121121

122122
cmd = "eb %(spec)s --regtest --sequential -ld --testoutput=%(output_dir)s"
123123
command = "unset TMPDIR && cd %s && %s; " % (cur_dir, cmd)

0 commit comments

Comments
 (0)