package : split environment_modifications into setup_environment and setup_dependent_environment.

package : renamed `module_modifications` to `modify_module` for consistency
This commit is contained in:
alalazo
2016-03-17 15:11:39 +01:00
parent 9cdd79e33f
commit f0f0663d1b
9 changed files with 49 additions and 60 deletions

View File

@@ -41,14 +41,17 @@ class Openmpi(Package):
def url_for_version(self, version):
return "http://www.open-mpi.org/software/ompi/v%s/downloads/openmpi-%s.tar.bz2" % (version.up_to(2), version)
def environment_modifications(self, dependent_spec):
env = super(Openmpi, self).environment_modifications(dependent_spec)
# FIXME : the compilers should point to the current wrappers, not to generic cc etc.
env.set_env('OMPI_CC', 'cc')
env.set_env('OMPI_CXX', 'c++')
env.set_env('OMPI_FC', 'f90')
env.set_env('OMPI_F77', 'f77')
return env
def setup_environment(self, env):
env.set_env('OMPI_CC', self.compiler.cc)
env.set_env('OMPI_CXX', self.compiler.cxx)
env.set_env('OMPI_FC', self.compiler.fc)
env.set_env('OMPI_F77', self.compiler.f77)
def setup_dependent_environment(self, env, dependent_spec):
env.set_env('OMPI_CC', spack_cc)
env.set_env('OMPI_CXX', spack_cxx)
env.set_env('OMPI_FC', spack_fc)
env.set_env('OMPI_F77', spack_f77)
def install(self, spec, prefix):
config_args = ["--prefix=%s" % prefix,