summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorscheibelp <scheibel1@llnl.gov>2017-05-03 18:41:26 -0700
committerGitHub <noreply@github.com>2017-05-03 18:41:26 -0700
commitbee105fbb97a4eaf4ce5f215b50f2ea4f6683f6a (patch)
tree4eb8d7fdf316659053572001397fe3cf11a5d26f /lib
parent18db25bb026d33fe6ed2bc572c12363ce79e0dc6 (diff)
parent708d8586eab7c8a1960a7a30269a0c43317746af (diff)
downloadspack-bee105fbb97a4eaf4ce5f215b50f2ea4f6683f6a.tar.gz
spack-bee105fbb97a4eaf4ce5f215b50f2ea4f6683f6a.tar.bz2
spack-bee105fbb97a4eaf4ce5f215b50f2ea4f6683f6a.tar.xz
spack-bee105fbb97a4eaf4ce5f215b50f2ea4f6683f6a.zip
Merge pull request #4069 from davydden/fix_transitive_build_dep
only add direct build-only dependencies to PATH
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_environment.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 2ac935291d..ac1eaaa77a 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -248,7 +248,7 @@ def set_build_environment_variables(pkg, env, dirty=False):
dirty (bool): Skip unsetting the user's environment settings
"""
# Gather information about various types of dependencies
- build_deps = pkg.spec.traverse(root=False, deptype=('build'))
+ build_deps = pkg.spec.dependencies(deptype='build')
link_deps = pkg.spec.traverse(root=False, deptype=('link'))
build_link_deps = pkg.spec.traverse(root=False, deptype=('build', 'link'))
rpath_deps = get_rpath_deps(pkg)
@@ -258,6 +258,11 @@ def set_build_environment_variables(pkg, env, dirty=False):
build_link_prefixes = [dep.prefix for dep in build_link_deps]
rpath_prefixes = [dep.prefix for dep in rpath_deps]
+ # add run-time dependencies of direct build-time dependencies:
+ for bd in build_deps:
+ for rd in bd.dependencies(deptype='run'):
+ build_prefixes.append(rd.prefix)
+
# Filter out system paths: ['/', '/usr', '/usr/local']
# These paths can be introduced into the build when an external package
# is added as a dependency. The problem with these paths is that they often