Set JAVA_HOME on module load and on dependent installs. (#1716)
* Set JAVA_HOME on module load and on dependent installs. * Include environment setup from dependencies in dependee module (#1714)
This commit is contained in:
parent
1cc48bf7d7
commit
02307cf7ce
2 changed files with 7 additions and 0 deletions
|
@ -392,6 +392,7 @@ def write(self, overwrite=False):
|
||||||
for mod in modules:
|
for mod in modules:
|
||||||
set_module_variables_for_package(package, mod)
|
set_module_variables_for_package(package, mod)
|
||||||
set_module_variables_for_package(package, package.module)
|
set_module_variables_for_package(package, package.module)
|
||||||
|
package.setup_environment(spack_env, env)
|
||||||
package.setup_dependent_package(self.pkg.module, self.spec)
|
package.setup_dependent_package(self.pkg.module, self.spec)
|
||||||
package.setup_dependent_environment(spack_env, env, self.spec)
|
package.setup_dependent_environment(spack_env, env, self.spec)
|
||||||
|
|
||||||
|
|
|
@ -68,3 +68,9 @@ def do_fetch(self, mirror_only=False):
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
distutils.dir_util.copy_tree(".", prefix)
|
distutils.dir_util.copy_tree(".", prefix)
|
||||||
|
|
||||||
|
def setup_environment(self, spack_env, run_env):
|
||||||
|
run_env.set('JAVA_HOME', self.spec.prefix)
|
||||||
|
|
||||||
|
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
|
||||||
|
spack_env.set('JAVA_HOME', self.spec.prefix)
|
||||||
|
|
Loading…
Reference in a new issue