netlib-scalapack: flake8 fixes

This commit is contained in:
Denis Davydov 2016-07-16 08:03:54 +02:00
parent 0752eccfa5
commit 561748a063

View file

@ -25,8 +25,10 @@
from spack import *
import sys
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/"
url = "http://www.netlib.org/scalapack/scalapack-2.0.2.tgz"
@ -48,10 +50,13 @@ class NetlibScalapack(Package):
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'),
"-DUSE_OPTIMIZED_LAPACK_BLAS:BOOL=ON", # forces scalapack to use find_package(LAPACK)
]
"-DBUILD_SHARED_LIBS:BOOL=%s" % ('ON' if '+shared' in spec else
'OFF'),
"-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:
options.extend([
@ -75,11 +80,10 @@ def install(self, spec, prefix):
make()
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):
fix_darwin_install_name(prefix.lib)
def setup_dependent_package(self, module, dependent_spec):
spec = self.spec
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.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)]