summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-02-08 22:01:00 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2015-02-08 22:01:00 -0800
commitc077f0570531aac76b9182a96a2a37ee0e633989 (patch)
tree40996bb3a4071c128442b220c915e48caa4ea246
parentf81b136547347997d043bd99adf9d7013f097c69 (diff)
downloadspack-c077f0570531aac76b9182a96a2a37ee0e633989.tar.gz
spack-c077f0570531aac76b9182a96a2a37ee0e633989.tar.bz2
spack-c077f0570531aac76b9182a96a2a37ee0e633989.tar.xz
spack-c077f0570531aac76b9182a96a2a37ee0e633989.zip
Move dpeendency environment setup to build_environemnt.
-rw-r--r--lib/spack/spack/build_environment.py5
-rw-r--r--lib/spack/spack/package.py5
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 45353ec640..cabde7dc86 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -207,3 +207,8 @@ def setup_package(pkg):
set_compiler_environment_variables(pkg)
set_build_environment_variables(pkg)
set_module_variables_for_package(pkg)
+
+ # Allow dependencies to set up environment as well.
+ for dep_spec in pkg.spec.traverse(root=False):
+ dep_spec.package.setup_dependent_environment(
+ pkg.module, dep_spec, pkg.spec)
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 6e319a1f87..b18d054990 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -829,11 +829,6 @@ class Package(object):
self.stage.chdir_to_source()
build_env.setup_package(self)
- # Allow dependencies to further set up the environment.
- for dep_spec in self.spec.traverse(root=False):
- dep_spec.package.setup_dependent_environment(
- self.module, dep_spec, self.spec)
-
if fake_install:
self.do_fake_install()
else: