diff options
author | Alec Scott <hi@alecbcs.com> | 2023-10-26 23:12:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-27 08:12:20 +0200 |
commit | feda52f800ac14f033e3cd7792cf534f31be032f (patch) | |
tree | 23d73015f7c9e18efb2807f3fe84150ce8d67d1d | |
parent | 8959d65577cfa49a23e5330c5d4fcab50b4d1d47 (diff) | |
download | spack-feda52f800ac14f033e3cd7792cf534f31be032f.tar.gz spack-feda52f800ac14f033e3cd7792cf534f31be032f.tar.bz2 spack-feda52f800ac14f033e3cd7792cf534f31be032f.tar.xz spack-feda52f800ac14f033e3cd7792cf534f31be032f.zip |
akantu: use f-strings (#40466)
Co-authored-by: Nicolas Richart <nrichart@users.noreply.github.com>
-rw-r--r-- | var/spack/repos/builtin/packages/akantu/package.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/akantu/package.py b/var/spack/repos/builtin/packages/akantu/package.py index 2952f9bb4a..bba92edcc8 100644 --- a/var/spack/repos/builtin/packages/akantu/package.py +++ b/var/spack/repos/builtin/packages/akantu/package.py @@ -65,10 +65,8 @@ class Akantu(CMakePackage): "-DAKANTU_HEAT_TRANSFER:BOOL=ON", "-DAKANTU_SOLID_MECHANICS:BOOL=ON", "-DAKANTU_STRUCTURAL_MECHANICS:BOOL=OFF", - "-DAKANTU_PARALLEL:BOOL={0}".format("ON" if spec.satisfies("+mpi") else "OFF"), - "-DAKANTU_PYTHON_INTERFACE:BOOL={0}".format( - "ON" if spec.satisfies("+python") else "OFF" - ), + f"-DAKANTU_PARALLEL:BOOL={'ON' if spec.satisfies('+mpi') else 'OFF'}", + f"-DAKANTU_PYTHON_INTERFACE:BOOL={'ON' if spec.satisfies('+python') else 'OFF'}", ] if spec.satisfies("@:3.0"): @@ -84,14 +82,14 @@ class Akantu(CMakePackage): solvers = [] if spec.satisfies("external_solvers=mumps"): solvers.append("Mumps") - args.append("-DMUMPS_DIR:PATH=${0}".format(spec["mumps"].prefix)) + args.append(f"-DMUMPS_DIR:PATH=${spec['mumps'].prefix}") if spec.satisfies("external_solvers=petsc"): solvers.append("PETSc") if len(solvers) > 0: args.extend( [ - "-DAKANTU_IMPLICIT_SOLVER:STRING={0}".format("+".join(solvers)), + f"-DAKANTU_IMPLICIT_SOLVER:STRING={'+'.join(solvers)}", "-DAKANTU_IMPLICIT:BOOL=ON", ] ) |