netlib-scalapack: flake8 fixes
This commit is contained in:
parent
0752eccfa5
commit
561748a063
@ -25,8 +25,10 @@
|
|||||||
from spack import *
|
from spack import *
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
class NetlibScalapack(Package):
|
class NetlibScalapack(Package):
|
||||||
"""ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines"""
|
"""ScaLAPACK is a library of high-performance linear algebra routines for
|
||||||
|
parallel distributed memory machines"""
|
||||||
|
|
||||||
homepage = "http://www.netlib.org/scalapack/"
|
homepage = "http://www.netlib.org/scalapack/"
|
||||||
url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz"
|
url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz"
|
||||||
@ -48,9 +50,12 @@ class NetlibScalapack(Package):
|
|||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
options = [
|
options = [
|
||||||
"-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else 'OFF'),
|
"-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else
|
||||||
"-DBUILD_STATIC_LIBS:BOOL=%s" % ('OFF' if '+shared' in spec else 'ON'),
|
'OFF'),
|
||||||
"-DUSE_OPTIMIZED_LAPACK_BLAS:BOOL=ON", # forces scalapack to use find_package(LAPACK)
|
"-DBUILD_STATIC_LIBS:BOOL=%s" % ('OFF' if '+shared' in spec else
|
||||||
|
'ON'),
|
||||||
|
# forces scalapack to use find_package(LAPACK):
|
||||||
|
"-DUSE_OPTIMIZED_LAPACK_BLAS:BOOL=ON",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Make sure we use Spack's Lapack:
|
# Make sure we use Spack's Lapack:
|
||||||
@ -75,11 +80,10 @@ def install(self, spec, prefix):
|
|||||||
make()
|
make()
|
||||||
make("install")
|
make("install")
|
||||||
|
|
||||||
# The shared libraries are not installed correctly on Darwin; correct this
|
# The shared libraries are not installed correctly on Darwin:
|
||||||
if (sys.platform == 'darwin') and ('+shared' in spec):
|
if (sys.platform == 'darwin') and ('+shared' in spec):
|
||||||
fix_darwin_install_name(prefix.lib)
|
fix_darwin_install_name(prefix.lib)
|
||||||
|
|
||||||
|
|
||||||
def setup_dependent_package(self, module, dependent_spec):
|
def setup_dependent_package(self, module, dependent_spec):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
|
lib_dsuffix = '.dylib' if sys.platform == 'darwin' else '.so'
|
||||||
@ -87,4 +91,5 @@ def setup_dependent_package(self, module, dependent_spec):
|
|||||||
|
|
||||||
spec.fc_link = '-L%s -lscalapack' % spec.prefix.lib
|
spec.fc_link = '-L%s -lscalapack' % spec.prefix.lib
|
||||||
spec.cc_link = spec.fc_link
|
spec.cc_link = spec.fc_link
|
||||||
spec.libraries = [join_path(spec.prefix.lib, 'libscalapack%s' % lib_suffix)]
|
spec.libraries = [join_path(spec.prefix.lib,
|
||||||
|
'libscalapack%s' % lib_suffix)]
|
||||||
|
Loading…
Reference in New Issue
Block a user