Skip to content

Commit f53be46

Browse files
scheibelpbecker33
authored andcommitted
wrap generator with collection to avoid exhausting it with single iteration (#5586)
1 parent ed656dc commit f53be46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/spack/spack/build_environment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ def set_build_environment_variables(pkg, env, dirty):
191191
dirty (bool): Skip unsetting the user's environment settings
192192
"""
193193
# Gather information about various types of dependencies
194-
build_deps = pkg.spec.dependencies(deptype=('build', 'test'))
195-
link_deps = pkg.spec.traverse(root=False, deptype=('link'))
196-
build_link_deps = list(build_deps) + list(link_deps)
194+
build_deps = set(pkg.spec.dependencies(deptype=('build', 'test')))
195+
link_deps = set(pkg.spec.traverse(root=False, deptype=('link')))
196+
build_link_deps = build_deps | link_deps
197197
rpath_deps = get_rpath_deps(pkg)
198198

199199
build_prefixes = [dep.prefix for dep in build_deps]

0 commit comments

Comments
 (0)