diff options
author | Denis Davydov <davydden@gmail.com> | 2016-05-11 15:45:57 +0200 |
---|---|---|
committer | Denis Davydov <davydden@gmail.com> | 2016-05-11 16:11:34 +0200 |
commit | eba264fcd0701b2172dc39d2616cb2f90b4d8578 (patch) | |
tree | b05eaff37436178110f87a2d2d027ecc627bafb8 /var | |
parent | 361b6290341e1248b3c5a5c3895b03610cb7ae3f (diff) | |
download | spack-eba264fcd0701b2172dc39d2616cb2f90b4d8578.tar.gz spack-eba264fcd0701b2172dc39d2616cb2f90b4d8578.tar.bz2 spack-eba264fcd0701b2172dc39d2616cb2f90b4d8578.tar.xz spack-eba264fcd0701b2172dc39d2616cb2f90b4d8578.zip |
fix formatting
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/openblas/package.py | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 47b30181a8..cd8e3755ce 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -1,8 +1,7 @@ from spack import * from spack.package_test import * -import sys import os -import shutil + class Openblas(Package): """OpenBLAS: An optimized BLAS library""" @@ -14,9 +13,9 @@ class Openblas(Package): version('0.2.16', 'fef46ab92463bdbb1479dcec594ef6dc') version('0.2.15', 'b1190f3d3471685f17cfd1ec1d252ac9') - variant('shared', default=True, description="Build shared libraries as well as static libs.") + variant('shared', default=True, description="Build shared libraries as well as static libs.") # NOQA: ignore=E501 variant('openmp', default=False, description="Enable OpenMP support.") - variant('fpic', default=True, description="Build position independent code") + variant('fpic', default=True, description="Build position independent code") # NOQA: ignore=E501 # virtual dependency provides('blas') @@ -48,11 +47,11 @@ class Openblas(Package): # Add support for OpenMP if '+openmp' in spec: - # Note: Apple's most recent Clang 7.3.0 still does not support OpenMP. - # What is worse, Openblas (as of 0.2.18) hardcoded that OpenMP cannot + # Openblas (as of 0.2.18) hardcoded that OpenMP cannot # be used with any (!) compiler named clang, bummer. if spec.satisfies('%clang'): - raise InstallError('OpenBLAS does not support OpenMP with clang!') + raise InstallError('OpenBLAS does not support ', + 'OpenMP with clang!') make_defs += ['USE_OPENMP=1'] @@ -69,29 +68,34 @@ class Openblas(Package): symlink('libopenblas.a', 'blas.a') symlink('libopenblas.a', 'libblas.a') if '+shared' in spec: - symlink('libopenblas.%s' % dso_suffix, 'libblas.%s' % dso_suffix) + symlink('libopenblas.%s' % dso_suffix, + 'libblas.%s' % dso_suffix) # Lapack virtual package should provide liblapack.a with working_dir(prefix.lib): symlink('libopenblas.a', 'liblapack.a') if '+shared' in spec: - symlink('libopenblas.%s' % dso_suffix, 'liblapack.%s' % dso_suffix) + symlink('libopenblas.%s' % dso_suffix, + 'liblapack.%s' % dso_suffix) # Openblas may pass its own test but still fail to compile Lapack - # symbols. To make sure we get working Blas and Lapack, do a small test. + # symbols. To make sure we get working Blas and Lapack, do a small + # test. self.check_install(spec) - def setup_dependent_package(self, module, dspec): # This is WIP for a prototype interface for virtual packages. # We can update this as more builds start depending on BLAS/LAPACK. - libdir = find_library_path('libopenblas.a', self.prefix.lib64, self.prefix.lib) + libdir = find_library_path('libopenblas.a', + self.prefix.lib64, + self.prefix.lib) self.spec.blas_static_lib = join_path(libdir, 'libopenblas.a') self.spec.lapack_static_lib = self.spec.blas_static_lib if '+shared' in self.spec: - self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' % dso_suffix) + self.spec.blas_shared_lib = join_path(libdir, 'libopenblas.%s' % + dso_suffix) self.spec.lapack_shared_lib = self.spec.blas_shared_lib def check_install(self, spec): @@ -108,5 +112,5 @@ class Openblas(Package): if '+openmp' in spec: link_flags.extend([self.compiler.openmp_flag]) - output = compile_c_and_execute(source_file,include_flags,link_flags) - compare_output_file(output,blessed_file) + output = compile_c_and_execute(source_file, include_flags, link_flags) + compare_output_file(output, blessed_file) |