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.
This commit is contained in:
Todd Gamblin
2015-02-08 19:41:17 -08:00
parent 60a385d4a4
commit 20ec80295d
3 changed files with 15 additions and 7 deletions

View File

@@ -46,7 +46,7 @@ def site_packages_dir(self):
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::

View File

@@ -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'