summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-02-08 19:41:17 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2015-02-08 19:41:17 -0800
commit20ec80295dbf2a36b633860c139d113f9c0e6388 (patch)
tree9390c9a4cd25d6d391fee6f723b9c7b4a45db25d /lib
parent60a385d4a44b16bce77725dbb4f71a26aa610ffc (diff)
downloadspack-20ec80295dbf2a36b633860c139d113f9c0e6388.tar.gz
spack-20ec80295dbf2a36b633860c139d113f9c0e6388.tar.bz2
spack-20ec80295dbf2a36b633860c139d113f9c0e6388.tar.xz
spack-20ec80295dbf2a36b633860c139d113f9c0e6388.zip
setup_extension_environment is now setup_dependent_environment.
- other packages, like Qt, can now use this to set up relevant build variables and env vars for their dependencies. - not just extensions anymore.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index b905968540..6e319a1f87 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -829,10 +829,10 @@ class Package(object):
self.stage.chdir_to_source()
build_env.setup_package(self)
- # Allow extendees to further set up the environment.
- if self.is_extension:
- self.extendee_spec.package.setup_extension_environment(
- self.module, self.extendee_spec, self.spec)
+ # 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()
@@ -910,8 +910,8 @@ class Package(object):
fromlist=[self.__class__.__name__])
- def setup_extension_environment(self, module, spec, ext_spec):
- """Called before the install() method of extensions.
+ def setup_dependent_environment(self, module, spec, dependent_spec):
+ """Called before the install() method of dependents.
Default implementation does nothing, but this can be
overridden by an extendable package to set up the install
@@ -930,6 +930,8 @@ class Package(object):
put a 'python' Execuable object in the module scope for the
extension package to simplify extension installs.
+ 3. A lot of Qt extensions need QTDIR set. This can be used to do that.
+
"""
pass