From 4417b1f9eeb4f82451a850b25b2aa871bd6babdf Mon Sep 17 00:00:00 2001 From: Auriane R <48684432+aurianer@users.noreply.github.com> Date: Thu, 7 Dec 2023 18:14:33 +0100 Subject: [PATCH] Update pika package to use f-strings (#41483) --- .../repos/builtin/packages/pika/package.py | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/pika/package.py b/var/spack/repos/builtin/packages/pika/package.py index 93eb626303..9a9dec5329 100644 --- a/var/spack/repos/builtin/packages/pika/package.py +++ b/var/spack/repos/builtin/packages/pika/package.py @@ -126,27 +126,17 @@ class Pika(CMakePackage, CudaPackage, ROCmPackage): with when("+rocm"): for val in ROCmPackage.amdgpu_targets: - depends_on( - "whip@0.1: amdgpu_target={0}".format(val), - when="@0.9: amdgpu_target={0}".format(val), - ) - depends_on( - "rocsolver amdgpu_target={0}".format(val), - when="@0.5: amdgpu_target={0}".format(val), - ) - depends_on( - "rocblas amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val) - ) + depends_on(f"whip@0.1: amdgpu_target={val}", when=f"@0.9: amdgpu_target={val}") + depends_on(f"rocsolver amdgpu_target={val}", when=f"@0.5: amdgpu_target={val}") + depends_on(f"rocblas amdgpu_target={val}", when=f"amdgpu_target={val}") with when("+cuda"): for val in CudaPackage.cuda_arch_values: - depends_on( - "whip@0.1: cuda_arch={0}".format(val), when="@0.9: cuda_arch={0}".format(val) - ) + depends_on(f"whip@0.1: cuda_arch={val}", when=f"@0.9: cuda_arch={val}") for cxxstd in cxxstds: - depends_on("boost cxxstd={0}".format(cxxstd), when="cxxstd={0}".format(cxxstd)) - depends_on("fmt cxxstd={0}".format(cxxstd), when="@0.11: cxxstd={0}".format(cxxstd)) + depends_on(f"boost cxxstd={cxxstd}", when=f"cxxstd={cxxstd}") + depends_on(f"fmt cxxstd={cxxstd}", when=f"@0.11: cxxstd={cxxstd}") # COROUTINES # ~generic_coroutines conflict is not fully implemented