diff options
author | otsukay <otsukay@gmail.com> | 2024-03-03 14:13:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 22:13:47 -0700 |
commit | fcb2f7d3aaa4e6cd925ab2a45f1ef0bb83634d4e (patch) | |
tree | b580dca2e2085239bee5e6e23aa446cb08843d26 | |
parent | a8a9e0160a6f9f624fe381162b4c45189d8ba1e2 (diff) | |
download | spack-fcb2f7d3aaa4e6cd925ab2a45f1ef0bb83634d4e.tar.gz spack-fcb2f7d3aaa4e6cd925ab2a45f1ef0bb83634d4e.tar.bz2 spack-fcb2f7d3aaa4e6cd925ab2a45f1ef0bb83634d4e.tar.xz spack-fcb2f7d3aaa4e6cd925ab2a45f1ef0bb83634d4e.zip |
Remove unnecessary if statements, which are harmful since +blas+lapack variants have been removed. (#42936)
Co-authored-by: Yuichi Otsuka <otsukay@riken.jp>
-rw-r--r-- | var/spack/repos/builtin/packages/py-numpy/package.py | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 4038b80271..c651b365b5 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -346,42 +346,36 @@ class PyNumpy(PythonPackage): if "^netlib-lapack" in spec or "^cray-libsci" in spec: # netlib and Cray require blas and lapack listed # separately so that scipy can find them - if spec.satisfies("+blas"): - f.write("[blas]\n") - f.write("libraries = {0}\n".format(blas_lib_names)) - write_library_dirs(f, blas_lib_dirs) - f.write("include_dirs = {0}\n".format(blas_header_dirs)) - if spec.satisfies("+lapack"): - f.write("[lapack]\n") - f.write("libraries = {0}\n".format(lapack_lib_names)) - write_library_dirs(f, lapack_lib_dirs) - f.write("include_dirs = {0}\n".format(lapack_header_dirs)) + f.write("[blas]\n") + f.write("libraries = {0}\n".format(blas_lib_names)) + write_library_dirs(f, blas_lib_dirs) + f.write("include_dirs = {0}\n".format(blas_header_dirs)) + f.write("[lapack]\n") + f.write("libraries = {0}\n".format(lapack_lib_names)) + write_library_dirs(f, lapack_lib_dirs) + f.write("include_dirs = {0}\n".format(lapack_header_dirs)) if "^fujitsu-ssl2" in spec: - if spec.satisfies("+blas"): - f.write("[blas]\n") - f.write("libraries = {0}\n".format(spec["blas"].libs.names[0])) - write_library_dirs(f, blas_lib_dirs) - f.write("include_dirs = {0}\n".format(blas_header_dirs)) - f.write("extra_link_args = {0}\n".format(self.spec["blas"].libs.ld_flags)) - if spec.satisfies("+lapack"): - f.write("[lapack]\n") - f.write("libraries = {0}\n".format(spec["lapack"].libs.names[0])) - write_library_dirs(f, lapack_lib_dirs) - f.write("include_dirs = {0}\n".format(lapack_header_dirs)) - f.write("extra_link_args = {0}\n".format(self.spec["lapack"].libs.ld_flags)) + f.write("[blas]\n") + f.write("libraries = {0}\n".format(spec["blas"].libs.names[0])) + write_library_dirs(f, blas_lib_dirs) + f.write("include_dirs = {0}\n".format(blas_header_dirs)) + f.write("extra_link_args = {0}\n".format(self.spec["blas"].libs.ld_flags)) + f.write("[lapack]\n") + f.write("libraries = {0}\n".format(spec["lapack"].libs.names[0])) + write_library_dirs(f, lapack_lib_dirs) + f.write("include_dirs = {0}\n".format(lapack_header_dirs)) + f.write("extra_link_args = {0}\n".format(self.spec["lapack"].libs.ld_flags)) if "^armpl-gcc" in spec or "^acfl" in spec: - if spec.satisfies("+blas"): - f.write("[blas]\n") - f.write("libraries = {0}\n".format(blas_lib_names)) - write_library_dirs(f, blas_lib_dirs) - f.write("include_dirs = {0}\n".format(blas_header_dirs)) - if spec.satisfies("+lapack"): - f.write("[lapack]\n") - f.write("libraries = {0}\n".format(lapack_lib_names)) - write_library_dirs(f, lapack_lib_dirs) - f.write("include_dirs = {0}\n".format(lapack_header_dirs)) + f.write("[blas]\n") + f.write("libraries = {0}\n".format(blas_lib_names)) + write_library_dirs(f, blas_lib_dirs) + f.write("include_dirs = {0}\n".format(blas_header_dirs)) + f.write("[lapack]\n") + f.write("libraries = {0}\n".format(lapack_lib_names)) + write_library_dirs(f, lapack_lib_dirs) + f.write("include_dirs = {0}\n".format(lapack_header_dirs)) @when("@:1.25") @run_before("install") |