diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-08 19:41:17 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2015-02-08 19:41:17 -0800 |
commit | 20ec80295dbf2a36b633860c139d113f9c0e6388 (patch) | |
tree | 9390c9a4cd25d6d391fee6f723b9c7b4a45db25d /var | |
parent | 60a385d4a44b16bce77725dbb4f71a26aa610ffc (diff) | |
download | spack-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 'var')
-rw-r--r-- | var/spack/packages/python/package.py | 2 | ||||
-rw-r--r-- | var/spack/packages/qt/package.py | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py index 8bffbf393c..eed81d095c 100644 --- a/var/spack/packages/python/package.py +++ b/var/spack/packages/python/package.py @@ -46,7 +46,7 @@ class Python(Package): return os.path.join(self.python_lib_dir, 'site-packages') - def setup_extension_environment(self, module, spec, ext_spec): + def setup_dependent_environment(self, module, spec, ext_spec): """Called before python modules' install() methods. In most cases, extensions will only need to have one line:: diff --git a/var/spack/packages/qt/package.py b/var/spack/packages/qt/package.py index 6a55c89701..fcbcd2491a 100644 --- a/var/spack/packages/qt/package.py +++ b/var/spack/packages/qt/package.py @@ -1,3 +1,4 @@ +import os from spack import * class Qt(Package): @@ -20,6 +21,11 @@ class Qt(Package): depends_on("libmng") depends_on("jpeg") + def setup_dependent_environment(self, module, spec, dep_spec): + """Dependencies of Qt find it using the QTDIR environment variable.""" + os.environ['QTDIR'] = self.prefix + + def patch(self): # Fix qmake compilers in the default mkspec qmake_conf = 'mkspecs/common/g++-base.conf' |