summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-22 01:56:16 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-22 01:56:16 -0700
commita26992ef55fed958c15b45b989fc0a4d57f02251 (patch)
tree5067a0d5c28931da0499601137fb873c2aa0a85d /var
parent3f32dd767edf43a933948a14dfc0e5cc81f92226 (diff)
downloadspack-a26992ef55fed958c15b45b989fc0a4d57f02251.tar.gz
spack-a26992ef55fed958c15b45b989fc0a4d57f02251.tar.bz2
spack-a26992ef55fed958c15b45b989fc0a4d57f02251.tar.xz
spack-a26992ef55fed958c15b45b989fc0a4d57f02251.zip
Change from PR #552: rename setup_dependent_python_module -> setup_dependent_package
- Fixed in package.py - Fixed wrong prototypes in packages that use it. - Fixed build_environment to set module variables properly - added hacky fix to ensure spec/package consistency in build processes. - Need to think about defensive spec copy done by `Repo.get`. May be time to think about an immutable spec implementation.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/mpich/package.py2
-rw-r--r--var/spack/repos/builtin/packages/netlib-scalapack/package.py22
2 files changed, 13 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py
index c4d9940bb7..b20dc8dd60 100644
--- a/var/spack/repos/builtin/packages/mpich/package.py
+++ b/var/spack/repos/builtin/packages/mpich/package.py
@@ -54,7 +54,7 @@ class Mpich(Package):
env.set('MPICH_F90', spack_f90)
env.set('MPICH_FC', spack_fc)
- def setup_dependent_python_module(self, module, spec, dep_spec):
+ def setup_dependent_package(self, module, dep_spec):
"""For dependencies, make mpicc's use spack wrapper."""
# FIXME : is this necessary ? Shouldn't this be part of a contract with MPI providers?
module.mpicc = join_path(self.prefix.bin, 'mpicc')
diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
index 62abfcc48e..c3e6822cdf 100644
--- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py
+++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py
@@ -1,4 +1,5 @@
from spack import *
+import sys
class NetlibScalapack(Package):
"""ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines"""
@@ -11,16 +12,16 @@ class NetlibScalapack(Package):
version('2.0.0', '9e76ae7b291be27faaad47cfc256cbfe')
# versions before 2.0.0 are not using cmake and requires blacs as
# a separated package
-
+
variant('shared', default=True, description='Build the shared library version')
variant('fpic', default=False, description="Build with -fpic compiler option")
-
+
provides('scalapack')
-
+
depends_on('mpi')
depends_on('lapack')
-
- def install(self, spec, prefix):
+
+ def install(self, spec, prefix):
options = [
"-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else 'OFF'),
"-DBUILD_STATIC_LIBS:BOOL=%s" % ('OFF' if '+shared' in spec else 'ON'),
@@ -40,10 +41,11 @@ class NetlibScalapack(Package):
make()
make("install")
- def setup_dependent_python_module(self, module, spec, dependent_spec):
+ def setup_dependent_package(self, module, dependent_spec):
+ spec = self.spec
lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
- lib_suffix = lib_dsuffix if '+shared' in spec['scalapack'] else '.a'
+ lib_suffix = lib_dsuffix if '+shared' in spec else '.a'
- spec['scalapack'].fc_link = '-L%s -lscalapack' % spec['scalapack'].prefix.lib
- spec['scalapack'].cc_link = spec['scalapack'].fc_link
- spec['scalapack'].libraries = [join_path(spec['scalapack'].prefix.lib, 'libscalapack%s' % lib_suffix)]
+ spec.fc_link = '-L%s -lscalapack' % spec.prefix.lib
+ spec.cc_link = spec.fc_link
+ spec.libraries = [join_path(spec.prefix.lib, 'libscalapack%s' % lib_suffix)]