summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/suite-sparse/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/suite-sparse/package.py')
-rw-r--r--var/spack/repos/builtin/packages/suite-sparse/package.py39
1 files changed, 20 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py
index 796baf7eee..3effe71cd9 100644
--- a/var/spack/repos/builtin/packages/suite-sparse/package.py
+++ b/var/spack/repos/builtin/packages/suite-sparse/package.py
@@ -17,6 +17,7 @@ class SuiteSparse(Package):
license("Apache-2.0")
+ version("7.7.0", sha256="529b067f5d80981f45ddf6766627b8fc5af619822f068f342aab776e683df4f3")
version("7.3.1", sha256="b512484396a80750acf3082adc1807ba0aabb103c2e09be5691f46f14d0a9718")
version("7.2.1", sha256="304e959a163ff74f8f4055dade3e0b5498d9aa3b1c483633bb400620f521509f")
version("5.13.0", sha256="59c6ca2959623f0c69226cf9afb9a018d12a37fab3a8869db5f6d7f83b6b147d")
@@ -149,7 +150,7 @@ class SuiteSparse(Package):
)
for symbol in symbols:
- args.append("CFLAGS+=-D{0}={1}{2}".format(symbol, symbol, suffix))
+ args.append(f"CFLAGS+=-D{symbol}={symbol}{suffix}")
def install(self, spec, prefix):
# The build system of SuiteSparse is quite old-fashioned.
@@ -171,23 +172,23 @@ class SuiteSparse(Package):
# completely disabled. See
# [SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk] for more.
"CUDA=no",
- "CUDA_PATH=%s" % (spec["cuda"].prefix if "+cuda" in spec else ""),
- "CFOPENMP=%s" % (self.compiler.openmp_flag if "+openmp" in spec else ""),
- "CFLAGS=-O3 %s" % cc_pic_flag,
+ f"CUDA_PATH={spec['cuda'].prefix if '+cuda' in spec else ''}",
+ f"CFOPENMP={self.compiler.openmp_flag if '+openmp' in spec else ''}",
+ f"CFLAGS=-O3 {cc_pic_flag}",
# Both FFLAGS and F77FLAGS are used in SuiteSparse makefiles;
# FFLAGS is used in CHOLMOD, F77FLAGS is used in AMD and UMFPACK.
- "FFLAGS=%s" % f77_pic_flag,
- "F77FLAGS=%s" % f77_pic_flag,
+ f"FFLAGS={f77_pic_flag}",
+ f"F77FLAGS={f77_pic_flag}",
# use Spack's metis in CHOLMOD/Partition module,
# otherwise internal Metis will be compiled
- "MY_METIS_LIB=%s" % spec["metis"].libs.ld_flags,
- "MY_METIS_INC=%s" % spec["metis"].prefix.include,
+ f"MY_METIS_LIB={spec['metis'].libs.ld_flags}",
+ f"MY_METIS_INC={spec['metis'].prefix.include}",
# Make sure Spack's Blas/Lapack is used. Otherwise System's
# Blas/Lapack might be picked up. Need to add -lstdc++, following
# with the TCOV path of SparseSuite 4.5.1's Suitesparse_config.mk,
# even though this fix is ugly
- "BLAS=%s" % (spec["blas"].libs.ld_flags + (" -lstdc++" if "@4.5.1" in spec else "")),
- "LAPACK=%s" % spec["lapack"].libs.ld_flags,
+ f"BLAS={spec['blas'].libs.ld_flags + (' -lstdc++' if '@4.5.1' in spec else '')}",
+ f"LAPACK={spec['lapack'].libs.ld_flags}",
]
# Recent versions require c11 but some demos do not get the c11 from
@@ -196,7 +197,7 @@ class SuiteSparse(Package):
# not an issue because c11 or newer is their default. However, for some
# compilers (e.g. xlc) the c11 flag is necessary.
if spec.satisfies("@5.4:5.7.1") and ("%xl" in spec or "%xl_r" in spec):
- make_args += ["CFLAGS+=%s" % self.compiler.c11_flag]
+ make_args += [f"CFLAGS+={self.compiler.c11_flag}"]
# 64bit blas in UMFPACK:
if (
@@ -222,28 +223,28 @@ class SuiteSparse(Package):
# Intel TBB in SuiteSparseQR
if "+tbb" in spec:
- make_args += ["SPQR_CONFIG=-DHAVE_TBB", "TBB=%s" % spec["tbb"].libs.ld_flags]
+ make_args += ["SPQR_CONFIG=-DHAVE_TBB", f"TBB={spec['tbb'].libs.ld_flags}"]
if "@5.3:" in spec:
# Without CMAKE_LIBRARY_PATH defined, the CMake file in the
# Mongoose directory finds libsuitesparseconfig.so in system
# directories like /usr/lib.
make_args += [
- "CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX=%s" % prefix
- + " -DCMAKE_LIBRARY_PATH=%s" % prefix.lib
- + " -DBLAS_ROOT=%s" % spec["blas"].prefix
- + " -DLAPACK_ROOT=%s" % spec["lapack"].prefix
+ f"CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX={prefix}"
+ + f" -DCMAKE_LIBRARY_PATH={prefix.lib}"
+ + f" -DBLAS_ROOT={spec['blas'].prefix}"
+ + f" -DLAPACK_ROOT={spec['lapack'].prefix}"
# *_LIBRARIES is critical to pick up static
# libraries (if intended) and also to avoid
# unintentional system blas/lapack packages
- + " -DBLAS_LIBRARIES=%s" % spec["blas"].libs
- + " -DLAPACK_LIBRARIES=%s" % spec["lapack"].libs
+ + f" -DBLAS_LIBRARIES={spec['blas'].libs}"
+ + f" -DLAPACK_LIBRARIES={spec['lapack'].libs}"
]
if spec.satisfies("%gcc platform=darwin"):
make_args += ["LDLIBS=-lm"]
- make_args.append("INSTALL=%s" % prefix)
+ make_args.append(f"INSTALL={prefix}")
# Filter the targets we're interested in
targets = [