diff options
author | Alec Scott <hi@alecbcs.com> | 2023-10-26 12:08:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-26 21:08:55 +0200 |
commit | cbf9dd0aee8043f86be22806e04cccb81a9afce8 (patch) | |
tree | 56d3cff49eb93d1cb8f0fcbafe1c2f90d90440ad | |
parent | 7ecb9243c166eeb062ec0b4faadb6978b7798ce8 (diff) | |
download | spack-cbf9dd0aee8043f86be22806e04cccb81a9afce8.tar.gz spack-cbf9dd0aee8043f86be22806e04cccb81a9afce8.tar.bz2 spack-cbf9dd0aee8043f86be22806e04cccb81a9afce8.tar.xz spack-cbf9dd0aee8043f86be22806e04cccb81a9afce8.zip |
unmaintained a* packages: update to use f-strings (#40467)
42 files changed, 137 insertions, 164 deletions
diff --git a/var/spack/repos/builtin/packages/abi-compliance-checker/package.py b/var/spack/repos/builtin/packages/abi-compliance-checker/package.py index 05d57471ba..6f575badd2 100644 --- a/var/spack/repos/builtin/packages/abi-compliance-checker/package.py +++ b/var/spack/repos/builtin/packages/abi-compliance-checker/package.py @@ -22,4 +22,4 @@ class AbiComplianceChecker(MakefilePackage): depends_on("universal-ctags") def install(self, spec, prefix): - make("prefix={0}".format(prefix), "install") + make(f"prefix={prefix}", "install") diff --git a/var/spack/repos/builtin/packages/abi-dumper/package.py b/var/spack/repos/builtin/packages/abi-dumper/package.py index f649bf9db2..584eed3664 100644 --- a/var/spack/repos/builtin/packages/abi-dumper/package.py +++ b/var/spack/repos/builtin/packages/abi-dumper/package.py @@ -25,4 +25,4 @@ class AbiDumper(Package): depends_on("vtable-dumper@1.1:") def install(self, spec, prefix): - make("prefix={0}".format(prefix), "install") + make(f"prefix={prefix}", "install") diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py index 445fc60bbe..a343bf69d7 100644 --- a/var/spack/repos/builtin/packages/abinit/package.py +++ b/var/spack/repos/builtin/packages/abinit/package.py @@ -101,11 +101,7 @@ class Abinit(AutotoolsPackage): # TODO: The logic here can be reversed with the new concretizer. Instead of # using `conflicts`, `depends_on` could be used instead. for fftw in ["amdfftw", "cray-fftw", "fujitsu-fftw", "fftw"]: - conflicts( - "+openmp", - when="^{0}~openmp".format(fftw), - msg="Need to request {0} +openmp".format(fftw), - ) + conflicts("+openmp", when=f"^{fftw}~openmp", msg=f"Need to request {fftw} +openmp") mkl_message = "Need to set dependent variant to threads=openmp" conflicts("+openmp", when="^intel-mkl threads=none", msg=mkl_message) @@ -137,34 +133,28 @@ class Abinit(AutotoolsPackage): oapp = options.append if "@:8" in spec: - oapp("--enable-optim={0}".format(self.spec.variants["optimization-flavor"].value)) + oapp(f"--enable-optim={self.spec.variants['optimization-flavor'].value}") else: - oapp("--with-optim-flavor={0}".format(self.spec.variants["optimization-flavor"].value)) + oapp(f"--with-optim-flavor={self.spec.variants['optimization-flavor'].value}") if "+wannier90" in spec: if "@:8" in spec: - oapp( - "--with-wannier90-libs=-L{0}".format( - spec["wannier90"].prefix.lib + " -lwannier -lm" - ) - ) - oapp("--with-wannier90-incs=-I{0}".format(spec["wannier90"].prefix.modules)) - oapp("--with-wannier90-bins={0}".format(spec["wannier90"].prefix.bin)) + oapp(f"--with-wannier90-libs=-L{spec['wannier90'].prefix.lib} -lwannier -lm") + oapp(f"--with-wannier90-incs=-I{spec['wannier90'].prefix.modules}") + oapp(f"--with-wannier90-bins={spec['wannier90'].prefix.bin}") oapp("--enable-connectors") oapp("--with-dft-flavor=atompaw+libxc+wannier90") else: options.extend( [ - "WANNIER90_CPPFLAGS=-I{0}".format(spec["wannier90"].prefix.modules), - "WANNIER90_LIBS=-L{0} {1}".format( - spec["wannier90"].prefix.lib, "-lwannier" - ), + f"WANNIER90_CPPFLAGS=-I{spec['wannier90'].prefix.modules}", + f"WANNIER90_LIBS=-L{spec['wannier90'].prefix.lib} -lwannier", ] ) else: if "@:9.8" in spec: - oapp("--with-fftw={0}".format(spec["fftw-api"].prefix)) - oapp("--with-hdf5={0}".format(spec["hdf5"].prefix)) + oapp(f"--with-fftw={spec['fftw-api'].prefix}") + oapp(f"--with-hdf5={spec['hdf5'].prefix}") if "@:8" in spec: oapp("--with-dft-flavor=atompaw+libxc") @@ -172,9 +162,9 @@ class Abinit(AutotoolsPackage): "--without-wannier90", if "+mpi" in spec: - oapp("CC={0}".format(spec["mpi"].mpicc)) - oapp("CXX={0}".format(spec["mpi"].mpicxx)) - oapp("FC={0}".format(spec["mpi"].mpifc)) + oapp(f"CC={spec['mpi'].mpicc}") + oapp(f"CXX={spec['mpi'].mpicxx}") + oapp(f"FC={spec['mpi'].mpifc}") # MPI version: # let the configure script auto-detect MPI support from mpi_prefix @@ -208,14 +198,14 @@ class Abinit(AutotoolsPackage): if "+scalapack" in spec: linalg = spec["scalapack"].libs + linalg if "@:8" in spec: - linalg_flavor = "scalapack+{0}".format(linalg_flavor) + linalg_flavor = f"scalapack+{linalg_flavor}" if "@:8" in spec: - oapp("--with-linalg-libs={0}".format(linalg.ld_flags)) + oapp(f"--with-linalg-libs={linalg.ld_flags}") else: - oapp("LINALG_LIBS={0}".format(linalg.ld_flags)) + oapp(f"LINALG_LIBS={linalg.ld_flags}") - oapp("--with-linalg-flavor={0}".format(linalg_flavor)) + oapp(f"--with-linalg-flavor={linalg_flavor}") if "^mkl" in spec: fftflavor = "dfti" @@ -225,32 +215,32 @@ class Abinit(AutotoolsPackage): else: fftflavor, fftlibs = "fftw3", "-lfftw3 -lfftw3f" - oapp("--with-fft-flavor={0}".format(fftflavor)) + oapp(f"--with-fft-flavor={fftflavor}") if "@:8" in spec: if "^mkl" in spec: - oapp("--with-fft-incs={0}".format(spec["fftw-api"].headers.cpp_flags)) - oapp("--with-fft-libs={0}".format(spec["fftw-api"].libs.ld_flags)) + oapp(f"--with-fft-incs={spec['fftw-api'].headers.cpp_flags}") + oapp(f"--with-fft-libs={spec['fftw-api'].libs.ld_flags}") else: options.extend( [ - "--with-fft-incs={0}".format(spec["fftw-api"].headers.cpp_flags), - "--with-fft-libs=-L{0} {1}".format(spec["fftw-api"].prefix.lib, fftlibs), + f"--with-fft-incs={spec['fftw-api'].headers.cpp_flags}", + f"--with-fft-libs=-L{spec['fftw-api'].prefix.lib} {fftlibs}", ] ) else: if "^mkl" in spec: options.extend( [ - "FFT_CPPFLAGS={0}".format(spec["fftw-api"].headers.cpp_flags), - "FFT_LIBs={0}".format(spec["fftw-api"].libs.ld_flags), + f"FFT_CPPFLAGS={spec['fftw-api'].headers.cpp_flags}", + f"FFT_LIBs={spec['fftw-api'].libs.ld_flags}", ] ) else: options.extend( [ - "FFTW3_CPPFLAGS={0}".format(spec["fftw-api"].headers.cpp_flags), - "FFTW3_LIBS=-L{0} {1}".format(spec["fftw-api"].prefix.lib, fftlibs), + f"FFTW3_CPPFLAGS={spec['fftw-api'].headers.cpp_flags}", + f"FFTW3_LIBS=-L{spec['fftw-api'].prefix.lib} {fftlibs}", ] ) @@ -259,12 +249,12 @@ class Abinit(AutotoolsPackage): if "@:8" in spec: options.extend( [ - "--with-libxc-incs={0}".format(libxc.headers.cpp_flags), - "--with-libxc-libs={0}".format(libxc.libs.ld_flags + " -lm"), + f"--with-libxc-incs={libxc.headers.cpp_flags}", + f"--with-libxc-libs={libxc.libs.ld_flags + ' -lm'}", ] ) else: - oapp("--with-libxc={0}".format(libxc.prefix)) + oapp(f"--with-libxc={libxc.prefix}") # Netcdf4/HDF5 hdf5 = spec["hdf5:hl"] @@ -276,24 +266,21 @@ class Abinit(AutotoolsPackage): # to link with the high level HDF5 library options.extend( [ - "--with-netcdf-incs={0}".format( + "--with-netcdf-incs={}".format( netcdfc.headers.cpp_flags + " " + netcdff.headers.cpp_flags ), - "--with-netcdf-libs={0}".format( + "--with-netcdf-libs={}".format( netcdff.libs.ld_flags + " " + hdf5.libs.ld_flags ), ] ) else: options.extend( - [ - "--with-netcdf={0}".format(netcdfc.prefix), - "--with-netcdf-fortran={0}".format(netcdff.prefix), - ] + [f"--with-netcdf={netcdfc.prefix}", f"--with-netcdf-fortran={netcdff.prefix}"] ) if self.spec.satisfies("%fj"): - oapp("FCFLAGS_MODDIR=-M{0}".format(join_path(self.stage.source_path, "src/mods"))) + oapp(f"FCFLAGS_MODDIR=-M{join_path(self.stage.source_path, 'src/mods')}") return options diff --git a/var/spack/repos/builtin/packages/abyss/package.py b/var/spack/repos/builtin/packages/abyss/package.py index c345626761..1cb46a8957 100644 --- a/var/spack/repos/builtin/packages/abyss/package.py +++ b/var/spack/repos/builtin/packages/abyss/package.py @@ -60,12 +60,12 @@ class Abyss(AutotoolsPackage): def configure_args(self): maxk = int(self.spec.variants["maxk"].value) args = [ - "--with-boost=%s" % self.spec["boost"].prefix, - "--with-sqlite=%s" % self.spec["sqlite"].prefix, - "--with-mpi=%s" % self.spec["mpi"].prefix, + f"--with-boost={self.spec['boost'].prefix}", + f"--with-sqlite={self.spec['sqlite'].prefix}", + f"--with-mpi={self.spec['mpi'].prefix}", ] if maxk: - args.append("--enable-maxk=%s" % maxk) + args.append(f"--enable-maxk={maxk}") if self.spec["mpi"].name == "mpich": args.append("--enable-mpich") return args diff --git a/var/spack/repos/builtin/packages/accfft/package.py b/var/spack/repos/builtin/packages/accfft/package.py index aa32f1b0a5..eb99aec484 100644 --- a/var/spack/repos/builtin/packages/accfft/package.py +++ b/var/spack/repos/builtin/packages/accfft/package.py @@ -32,15 +32,15 @@ class Accfft(CMakePackage, CudaPackage): def cmake_args(self): spec = self.spec args = [ - "-DFFTW_ROOT={0}".format(spec["fftw"].prefix), - "-DFFTW_USE_STATIC_LIBS=false", - "-DBUILD_GPU={0}".format("true" if "+cuda" in spec else "false"), - "-DBUILD_SHARED={0}".format("true" if "+shared" in spec else "false"), + self.define("FFTW_ROOT", spec["fftw"].prefix), + self.define("FFTW_USE_STATIC_LIBS", "false"), + self.define("BUILD_GPU", str(spec.satisfies("+cuda")).lower()), + self.define("BUILD_SHARED", str(spec.satisfies("+shared")).lower()), ] if "+cuda" in spec: cuda_arch = [x for x in spec.variants["cuda_arch"].value if x] if cuda_arch: - args.append("-DCUDA_NVCC_FLAGS={0}".format(" ".join(self.cuda_flags(cuda_arch)))) + args.append(f"-DCUDA_NVCC_FLAGS={' '.join(self.cuda_flags(cuda_arch))}") return args diff --git a/var/spack/repos/builtin/packages/ace/package.py b/var/spack/repos/builtin/packages/ace/package.py index c152bbdeb6..afd164fc31 100644 --- a/var/spack/repos/builtin/packages/ace/package.py +++ b/var/spack/repos/builtin/packages/ace/package.py @@ -43,4 +43,4 @@ class Ace(MakefilePackage): "include $(ACE_ROOT)/include/makeinclude/" "platform_linux" + supported[self.compiler.name] + ".GNU\n" ) - f.write("INSTALL_PREFIX=%s" % prefix) + f.write(f"INSTALL_PREFIX={prefix}") diff --git a/var/spack/repos/builtin/packages/ack/package.py b/var/spack/repos/builtin/packages/ack/package.py index 684106ff5d..320f9e818c 100644 --- a/var/spack/repos/builtin/packages/ack/package.py +++ b/var/spack/repos/builtin/packages/ack/package.py @@ -41,7 +41,7 @@ class Ack(Package): def install(self, spec, prefix): mkdirp(prefix.bin) - ack_source = "ack-{0}-single-file".format(self.version) + ack_source = f"ack-{self.version}-single-file" ack_installed = join_path(prefix.bin, "ack") # install source diff --git a/var/spack/repos/builtin/packages/acpica-tools/package.py b/var/spack/repos/builtin/packages/acpica-tools/package.py index 55fee583c7..c9d063a5a9 100644 --- a/var/spack/repos/builtin/packages/acpica-tools/package.py +++ b/var/spack/repos/builtin/packages/acpica-tools/package.py @@ -19,4 +19,4 @@ class AcpicaTools(MakefilePackage): depends_on("bison", type="build") def install(self, spec, prefix): - make("PREFIX={0}".format(prefix), "install") + make(f"PREFIX={prefix}", "install") diff --git a/var/spack/repos/builtin/packages/activeharmony/package.py b/var/spack/repos/builtin/packages/activeharmony/package.py index e3f2d92955..62af3515b9 100644 --- a/var/spack/repos/builtin/packages/activeharmony/package.py +++ b/var/spack/repos/builtin/packages/activeharmony/package.py @@ -29,7 +29,7 @@ class Activeharmony(MakefilePackage): @when("@:4.5") def install(self, spec, prefix): - make("install", "PREFIX=%s" % prefix) + make("install", f"PREFIX={prefix}") @when("@4.6.0:") def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/adf/package.py b/var/spack/repos/builtin/packages/adf/package.py index 908cd5351f..244087f111 100644 --- a/var/spack/repos/builtin/packages/adf/package.py +++ b/var/spack/repos/builtin/packages/adf/package.py @@ -19,7 +19,7 @@ class Adf(Package): version("2017.113", sha256="666ef15d253b74c707dd14da35e7cf283ca20e21e24ed43cb953fb9d1f2f1e15") def url_for_version(self, version): - return "file://{0}/adf/adf{1}.pc64_linux.openmpi.bin.tgz".format(os.getcwd(), version) + return f"file://{os.getcwd()}/adf/adf{version}.pc64_linux.openmpi.bin.tgz" # Licensing license_required = True diff --git a/var/spack/repos/builtin/packages/alglib/package.py b/var/spack/repos/builtin/packages/alglib/package.py index f962d0fd44..98ade340fd 100644 --- a/var/spack/repos/builtin/packages/alglib/package.py +++ b/var/spack/repos/builtin/packages/alglib/package.py @@ -30,7 +30,7 @@ class Alglib(MakefilePackage): filter_file(r"so", dso_suffix, make_file) def install(self, spec, prefix): - name = "libalglib.{0}".format(dso_suffix) + name = f"libalglib.{dso_suffix}" with working_dir("src"): mkdirp(prefix.lib) install(name, prefix.lib) diff --git a/var/spack/repos/builtin/packages/alsa-lib/package.py b/var/spack/repos/builtin/packages/alsa-lib/package.py index 631e9bf685..46e3d2f1bf 100644 --- a/var/spack/repos/builtin/packages/alsa-lib/package.py +++ b/var/spack/repos/builtin/packages/alsa-lib/package.py @@ -30,8 +30,8 @@ class AlsaLib(AutotoolsPackage): spec = self.spec args = [] if spec.satisfies("+python"): - args.append("--with-pythonlibs={0}".format(spec["python"].libs.ld_flags)) - args.append("--with-pythonincludes={0}".format(spec["python"].headers.include_flags)) + args.append(f"--with-pythonlibs={spec['python'].libs.ld_flags}") + args.append(f"--with-pythonincludes={spec['python'].headers.include_flags}") else: args.append("--disable-python") return args diff --git a/var/spack/repos/builtin/packages/amg2013/package.py b/var/spack/repos/builtin/packages/amg2013/package.py index 638e874a46..def0b495a8 100644 --- a/var/spack/repos/builtin/packages/amg2013/package.py +++ b/var/spack/repos/builtin/packages/amg2013/package.py @@ -46,9 +46,9 @@ class Amg2013(MakefilePackage): if "+int64" in self.spec: include_cflags.append("-DHYPRE_BIGINT") - targets.append("INCLUDE_CFLAGS={0}".format(" ".join(include_cflags))) - targets.append("INCLUDE_LFLAGS={0}".format(" ".join(include_lflags))) - targets.append("CC={0}".format(self.spec["mpi"].mpicc)) + targets.append(f"INCLUDE_CFLAGS={' '.join(include_cflags)}") + targets.append(f"INCLUDE_LFLAGS={' '.join(include_lflags)}") + targets.append(f"CC={self.spec['mpi'].mpicc}") return targets diff --git a/var/spack/repos/builtin/packages/amg2023/package.py b/var/spack/repos/builtin/packages/amg2023/package.py index 96b2dc335d..a2e8b676e9 100644 --- a/var/spack/repos/builtin/packages/amg2023/package.py +++ b/var/spack/repos/builtin/packages/amg2023/package.py @@ -40,7 +40,7 @@ class Amg2023(CMakePackage, CudaPackage, ROCmPackage): cmake_options = [] cmake_options.append(self.define_from_variant("AMG_WITH_CALIPER", "caliper")) cmake_options.append(self.define_from_variant("AMG_WITH_OMP", "openmp")) - cmake_options.append("-DHYPRE_PREFIX={0}".format(self.spec["hypre"].prefix)) + cmake_options.append(self.define("HYPRE_PREFIX", self.spec["hypre"].prefix)) if self.spec["hypre"].satisfies("+cuda"): cmake_options.append("-DAMG_WITH_CUDA=ON") if self.spec["hypre"].satisfies("+rocm"): diff --git a/var/spack/repos/builtin/packages/amp/package.py b/var/spack/repos/builtin/packages/amp/package.py index 1716a13e57..f0ec4071ce 100644 --- a/var/spack/repos/builtin/packages/amp/package.py +++ b/var/spack/repos/builtin/packages/amp/package.py @@ -117,9 +117,7 @@ class Amp(CMakePackage): ): if "+" + vname in spec: tpl_list.append(vname.upper()) - options.append( - self.define("TPL_{0}_INSTALL_DIR".format(vname.upper()), spec[vname].prefix) - ) + options.append(self.define(f"TPL_{vname.upper()}_INSTALL_DIR", spec[vname].prefix)) if "+netcdf" in spec: tpl_list.append("NETCDF") diff --git a/var/spack/repos/builtin/packages/anicalculator/package.py b/var/spack/repos/builtin/packages/anicalculator/package.py index b14e05a670..9d002975d9 100644 --- a/var/spack/repos/builtin/packages/anicalculator/package.py +++ b/var/spack/repos/builtin/packages/anicalculator/package.py @@ -19,7 +19,7 @@ class Anicalculator(Package): https://spack.readthedocs.io/en/latest/mirrors.html""" homepage = "https://ani.jgi.doe.gov/html/download.php?" - url = "file://{0}/ANIcalculator_v1.tgz".format(os.getcwd()) + url = f"file://{os.getcwd()}/ANIcalculator_v1.tgz" manual_download = True version("1", sha256="236596a9a204cbcad162fc66be3506b2530b1f48f4f84d9647ccec3ca7483a43") diff --git a/var/spack/repos/builtin/packages/ape/package.py b/var/spack/repos/builtin/packages/ape/package.py index 9468a7f9a6..39b833ab0e 100644 --- a/var/spack/repos/builtin/packages/ape/package.py +++ b/var/spack/repos/builtin/packages/ape/package.py @@ -23,9 +23,9 @@ class Ape(Package): args = [] args.extend( [ - "--prefix=%s" % prefix, - "--with-gsl-prefix=%s" % spec["gsl"].prefix, - "--with-libxc-prefix=%s" % spec["libxc"].prefix, + f"--prefix={prefix}", + f"--with-gsl-prefix={spec['gsl'].prefix}", + f"--with-libxc-prefix={spec['libxc'].prefix}", ] ) diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py index 2351c48619..dc0fad53d2 100644 --- a/var/spack/repos/builtin/packages/apr-util/package.py +++ b/var/spack/repos/builtin/packages/apr-util/package.py @@ -37,16 +37,16 @@ class AprUtil(AutotoolsPackage): @property def libs(self): return find_libraries( - ["libaprutil-{0}".format(self.version.up_to(1))], root=self.prefix, recursive=True + [f"libaprutil-{self.version.up_to(1)}"], root=self.prefix, recursive=True ) def configure_args(self): spec = self.spec args = [ - "--with-apr={0}".format(spec["apr"].prefix), - "--with-expat={0}".format(spec["expat"].prefix), - "--with-iconv={0}".format(spec["iconv"].prefix), + f"--with-apr={spec['apr'].prefix}", + f"--with-expat={spec['expat'].prefix}", + f"--with-iconv={spec['iconv'].prefix}", # TODO: Add support for the following database managers "--without-ndbm", "--without-berkeley-db", @@ -55,34 +55,30 @@ class AprUtil(AutotoolsPackage): ] if "+crypto" in spec: - args.extend(["--with-crypto", "--with-openssl={0}".format(spec["openssl"].prefix)]) + args.extend(["--with-crypto", f"--with-openssl={spec['openssl'].prefix}"]) else: args.append("--without-crypto") if "+gdbm" in spec: - args.append("--with-gdbm={0}".format(spec["gdbm"].prefix)) + args.append(f"--with-gdbm={spec['gdbm'].prefix}") else: args.append("--without-gdbm") if "+pgsql" in spec: - args.append("--with-pgsql={0}".format(spec["postgresql"].prefix)) + args.append(f"--with-pgsql={spec['postgresql'].prefix}") else: args.append("--without-pgsql") if "+sqlite" in spec: if spec.satisfies("^sqlite@3.0:3"): - args.extend( - ["--with-sqlite3={0}".format(spec["sqlite"].prefix), "--without-sqlite2"] - ) + args.extend([f"--with-sqlite3={spec['sqlite'].prefix}", "--without-sqlite2"]) elif spec.satisfies("^sqlite@2.0:2"): - args.extend( - ["--with-sqlite2={0}".format(spec["sqlite"].prefix), "--without-sqlite3"] - ) + args.extend([f"--with-sqlite2={spec['sqlite'].prefix}", "--without-sqlite3"]) else: args.extend(["--without-sqlite2", "--without-sqlite3"]) if "+odbc" in spec: - args.append("--with-odbc={0}".format(spec["unixodbc"].prefix)) + args.append(f"--with-odbc={spec['unixodbc'].prefix}") else: args.append("--without-odbc") diff --git a/var/spack/repos/builtin/packages/apr/package.py b/var/spack/repos/builtin/packages/apr/package.py index de82ee5817..45de21e3ee 100644 --- a/var/spack/repos/builtin/packages/apr/package.py +++ b/var/spack/repos/builtin/packages/apr/package.py @@ -26,5 +26,5 @@ class Apr(AutotoolsPackage): @property def libs(self): return find_libraries( - ["libapr-{0}".format(self.version.up_to(1))], root=self.prefix, recursive=True + [f"libapr-{self.version.up_to(1)}"], root=self.prefix, recursive=True ) diff --git a/var/spack/repos/builtin/packages/aragorn/package.py b/var/spack/repos/builtin/packages/aragorn/package.py index dc55dc52bb..8ac7894192 100644 --- a/var/spack/repos/builtin/packages/aragorn/package.py +++ b/var/spack/repos/builtin/packages/aragorn/package.py @@ -31,7 +31,7 @@ class Aragorn(Package): # fix checksum error def url_for_version(self, version): - return "http://www.ansikte.se/ARAGORN/Downloads/aragorn{0}.c".format(version) + return f"http://www.ansikte.se/ARAGORN/Downloads/aragorn{version}.c" def install(self, spec, prefix): cc = Executable(spack_cc) diff --git a/var/spack/repos/builtin/packages/archer/package.py b/var/spack/repos/builtin/packages/archer/package.py index 8492eebc96..52011bebd4 100644 --- a/var/spack/repos/builtin/packages/archer/package.py +++ b/var/spack/repos/builtin/packages/archer/package.py @@ -38,9 +38,9 @@ class Archer(CMakePackage): def cmake_args(self): return [ - "-DCMAKE_C_COMPILER=clang", - "-DCMAKE_CXX_COMPILER=clang++", - "-DOMP_PREFIX:PATH=%s" % self.spec["llvm-openmp-ompt"].prefix, + self.define("CMAKE_C_COMPILER", "clang"), + self.define("CMAKE_CXX_COMPILER", "clang++"), + self.define("OMP_PREFIX:PATH", self.spec["llvm-openmp-ompt"].prefix), ] @run_after("install") @@ -56,7 +56,7 @@ class Archer(CMakePackage): raise SkipTest("Parallel test directory does not exist") test_exe = "parallel-simple" - test_src = "{0}.c".format(test_exe) + test_src = f"{test_exe}.c" with working_dir(test_dir): clang = which("clang-archer") clang("-o", test_exe, test_src) diff --git a/var/spack/repos/builtin/packages/argon2/package.py b/var/spack/repos/builtin/packages/argon2/package.py index c9762b6bc9..d41ba9761c 100644 --- a/var/spack/repos/builtin/packages/argon2/package.py +++ b/var/spack/repos/builtin/packages/argon2/package.py @@ -20,4 +20,4 @@ class Argon2(MakefilePackage): version("20161029", sha256="fe0049728b946b58b94cc6db89b34e2d050c62325d16316a534d2bedd78cd5e7") def install(self, spec, prefix): - make("PREFIX={0}".format(prefix), "install", "LIBRARY_REL=lib") + make(f"PREFIX={prefix}", "install", "LIBRARY_REL=lib") diff --git a/var/spack/repos/builtin/packages/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py index 9d83de741a..78794086f9 100644 --- a/var/spack/repos/builtin/packages/armadillo/package.py +++ b/var/spack/repos/builtin/packages/armadillo/package.py @@ -66,14 +66,14 @@ class Armadillo(CMakePackage): return [ # ARPACK support - "-DARPACK_LIBRARY={0}".format(spec["arpack-ng"].libs.joined(";")), + self.define("ARPACK_LIBRARY", spec["arpack-ng"].libs.joined(";")), # BLAS support - "-DBLAS_LIBRARY={0}".format(spec["blas"].libs.joined(";")), + self.define("BLAS_LIBRARY", spec["blas"].libs.joined(";")), # LAPACK support - "-DLAPACK_LIBRARY={0}".format(spec["lapack"].libs.joined(";")), + self.define("LAPACK_LIBRARY", spec["lapack"].libs.joined(";")), # SuperLU support - "-DSuperLU_INCLUDE_DIR={0}".format(spec["superlu"].prefix.include), - "-DSuperLU_LIBRARY={0}".format(spec["superlu"].libs.joined(";")), + self.define("SuperLU_INCLUDE_DIR", spec["superlu"].prefix.include), + self.define("SuperLU_LIBRARY", spec["superlu"].libs.joined(";")), # HDF5 support - "-DDETECT_HDF5={0}".format("ON" if "+hdf5" in spec else "OFF"), + self.define("DETECT_HDF5", "ON" if spec.satisfies("+hdf5") else "OFF"), ] diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py index 92176069c1..c50b90d6d1 100644 --- a/var/spack/repos/builtin/packages/arpack-ng/package.py +++ b/var/spack/repos/builtin/packages/arpack-ng/package.py @@ -150,14 +150,14 @@ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder): options = ( self.enable_or_disable("mpi") + [ - "--with-blas={0}".format(spec["blas"].libs.ld_flags), - "--with-lapack={0}".format(spec["lapack"].libs.ld_flags), + f"--with-blas={spec['blas'].libs.ld_flags}", + f"--with-lapack={spec['lapack'].libs.ld_flags}", ] + self.enable_or_disable("shared") ) if "+mpi" in spec: - options.append("F77={0}".format(spec["mpi"].mpif77)) + options.append(f"F77={spec['mpi'].mpif77}") return options diff --git a/var/spack/repos/builtin/packages/asdcplib/package.py b/var/spack/repos/builtin/packages/asdcplib/package.py index 7ca3b2f9f1..5aec849ee5 100644 --- a/var/spack/repos/builtin/packages/asdcplib/package.py +++ b/var/spack/repos/builtin/packages/asdcplib/package.py @@ -27,6 +27,6 @@ class Asdcplib(AutotoolsPackage): def configure_args(self): spec = self.spec - args = ["--with-openssl={0}".format(spec["openssl"].prefix)] + args = [f"--with-openssl={spec['openssl'].prefix}"] return args diff --git a/var/spack/repos/builtin/packages/aspa/package.py b/var/spack/repos/builtin/packages/aspa/package.py index 6bfbad1d39..8219a46b00 100644 --- a/var/spack/repos/builtin/packages/aspa/package.py +++ b/var/spack/repos/builtin/packages/aspa/package.py @@ -35,12 +35,12 @@ class Aspa(MakefilePackage): targets = [ "--directory=exec", "--file=Makefile", - "LIBS={0} {1} {2}".format( + "LIBS={} {} {}".format( self.spec["lapack"].libs.ld_flags, self.spec["blas"].libs.ld_flags, self.spec["hdf5"].libs.ld_flags, ), - "CXX={0}".format(self.spec["mpi"].mpicxx), + f"CXX={self.spec['mpi'].mpicxx}", ] return targets diff --git a/var/spack/repos/builtin/packages/aspcud/package.py b/var/spack/repos/builtin/packages/aspcud/package.py index fbaef453e9..8233dcaba0 100644 --- a/var/spack/repos/builtin/packages/aspcud/package.py +++ b/var/spack/repos/builtin/packages/aspcud/package.py @@ -28,11 +28,9 @@ class Aspcud(CMakePackage): depends_on("clingo") def cmake_args(self): - spec = self.spec - gringo_path = join_path(spec["clingo"].prefix.bin, "gringo") - clasp_path = join_path(spec["clingo"].prefix.bin, "clasp") - args = [ - "-DASPCUD_GRINGO_PATH={0}".format(gringo_path), - "-DASPCUD_CLASP_PATH={0}".format(clasp_path), + gringo_path = join_path(self.spec["clingo"].prefix.bin, "gringo") + clasp_path = join_path(self.spec["clingo"].prefix.bin, "clasp") + return [ + self.define("ASPCUD_GRINGO_PATH", gringo_path), + self.define("ASPCUD_CLASP_PATH", clasp_path), ] - return args diff --git a/var/spack/repos/builtin/packages/aspera-cli/package.py b/var/spack/repos/builtin/packages/aspera-cli/package.py index afa63b4c33..91aa1e19e4 100644 --- a/var/spack/repos/builtin/packages/aspera-cli/package.py +++ b/var/spack/repos/builtin/packages/aspera-cli/package.py @@ -29,7 +29,7 @@ class AsperaCli(Package): # Update destination path filter_file( "INSTALL_DIR=~/.aspera", - "INSTALL_DIR=%s" % prefix, + f"INSTALL_DIR={prefix}", runfile, string=True, stop_at="__ARCHIVE_FOLLOWS__", diff --git a/var/spack/repos/builtin/packages/astral/package.py b/var/spack/repos/builtin/packages/astral/package.py index 3afa3691ba..af196ab9c3 100644 --- a/var/spack/repos/builtin/packages/astral/package.py +++ b/var/spack/repos/builtin/packages/astral/package.py @@ -31,7 +31,7 @@ class Astral(Package): make() mkdirp(prefix.bin) install_tree("lib", prefix.tools.lib) - jar_file = "astral.{v}.jar".format(v=self.version) + jar_file = f"astral.{self.version}.jar" install(jar_file, prefix.tools) script_sh = join_path(os.path.dirname(__file__), "astral.sh") diff --git a/var/spack/repos/builtin/packages/astyle/package.py b/var/spack/repos/builtin/packages/astyle/package.py index 951661004b..ef4fe29378 100644 --- a/var/spack/repos/builtin/packages/astyle/package.py +++ b/var/spack/repos/builtin/packages/astyle/package.py @@ -30,11 +30,11 @@ class Astyle(MakefilePackage): def edit(self, spec, prefix): makefile = join_path(self.build_directory, "Makefile") - filter_file(r"^CXX\s*=.*", "CXX=%s" % spack_cxx, makefile) + filter_file(r"^CXX\s*=.*", f"CXX={spack_cxx}", makefile) # If the group is not a user account, the installation will fail, # so remove the -o $ (USER) -g $ (USER) parameter. filter_file(r"^INSTALL=.*", "INSTALL=install", makefile) @property def install_targets(self): - return ["install", "prefix={0}".format(self.prefix)] + return ["install", f"prefix={self.prefix}"] diff --git a/var/spack/repos/builtin/packages/at-spi2-atk/package.py b/var/spack/repos/builtin/packages/at-spi2-atk/package.py index 27e875f9f6..6e2f492112 100644 --- a/var/spack/repos/builtin/packages/at-spi2-atk/package.py +++ b/var/spack/repos/builtin/packages/at-spi2-atk/package.py @@ -27,4 +27,4 @@ class AtSpi2Atk(MesonPackage): def url_for_version(self, version): """Handle gnome's version-based custom URLs.""" url = "http://ftp.gnome.org/pub/gnome/sources/at-spi2-atk" - return url + "/%s/at-spi2-atk-%s.tar.xz" % (version.up_to(2), version) + return url + f"/{version.up_to(2)}/at-spi2-atk-{version}.tar.xz" diff --git a/var/spack/repos/builtin/packages/at-spi2-core/package.py b/var/spack/repos/builtin/packages/at-spi2-core/package.py index f1bf5a61c8..ec8cbd5e23 100644 --- a/var/spack/repos/builtin/packages/at-spi2-core/package.py +++ b/var/spack/repos/builtin/packages/at-spi2-core/package.py @@ -45,7 +45,7 @@ class AtSpi2Core(MesonPackage): def url_for_version(self, version): """Handle gnome's version-based custom URLs.""" url = "http://ftp.gnome.org/pub/gnome/sources/at-spi2-core" - return url + "/%s/at-spi2-core-%s.tar.xz" % (version.up_to(2), version) + return url + f"/{version.up_to(2)}/at-spi2-core-{version}.tar.xz" def setup_run_environment(self, env): env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0")) diff --git a/var/spack/repos/builtin/packages/atk/package.py b/var/spack/repos/builtin/packages/atk/package.py index 41dec1c587..52849669ec 100644 --- a/var/spack/repos/builtin/packages/atk/package.py +++ b/var/spack/repos/builtin/packages/atk/package.py @@ -43,7 +43,7 @@ class Atk(Package): def url_for_version(self, version): """Handle gnome's version-based custom URLs.""" url = "http://ftp.gnome.org/pub/gnome/sources/atk" - return url + "/%s/atk-%s.tar.xz" % (version.up_to(2), version) + return url + f"/{version.up_to(2)}/atk-{version}.tar.xz" def setup_run_environment(self, env): env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0")) @@ -64,7 +64,7 @@ class Atk(Package): @when("@:2.27") def install(self, spec, prefix): - configure("--prefix={0}".format(prefix)) + configure(f"--prefix={prefix}") make() if self.run_tests: make("check") diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index d23a16cb1b..ecc6379b57 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -109,11 +109,11 @@ class Atlas(Package): # Lapack resource to provide full lapack build. Note that # ATLAS only provides a few LAPACK routines natively. - options.append("--with-netlib-lapack-tarfile=%s" % self.stage[1].archive_file) + options.append(f"--with-netlib-lapack-tarfile={self.stage[1].archive_file}") with working_dir("spack-build", create=True): configure = Executable("../configure") - configure("--prefix=%s" % prefix, *options) + configure(f"--prefix={prefix}", *options) make() make("check") make("ptcheck") @@ -147,7 +147,7 @@ class Atlas(Package): source_file = join_path(os.path.dirname(self.module.__file__), "test_cblas_dgemm.c") blessed_file = join_path(os.path.dirname(self.module.__file__), "test_cblas_dgemm.output") - include_flags = ["-I%s" % self.spec.prefix.include] + include_flags = [f"-I{self.spec.prefix.include}"] link_flags = self.spec["atlas"].libs.ld_flags.split() output = compile_c_and_execute(source_file, include_flags, link_flags) diff --git a/var/spack/repos/builtin/packages/atom-dft/package.py b/var/spack/repos/builtin/packages/atom-dft/package.py index 9015067428..3f8c5e7756 100644 --- a/var/spack/repos/builtin/packages/atom-dft/package.py +++ b/var/spack/repos/builtin/packages/atom-dft/package.py @@ -24,8 +24,8 @@ class AtomDft(MakefilePackage): @property def build_targets(self): return [ - "XMLF90_ROOT=%s" % self.spec["xmlf90"].prefix, - "GRIDXC_ROOT=%s" % self.spec["libgridxc"].prefix, + f"XMLF90_ROOT={self.spec['xmlf90'].prefix}", + f"GRIDXC_ROOT={self.spec['libgridxc'].prefix}", "FC=fc", ] diff --git a/var/spack/repos/builtin/packages/atompaw/package.py b/var/spack/repos/builtin/packages/atompaw/package.py index 7cc4b4d417..f0ea750583 100644 --- a/var/spack/repos/builtin/packages/atompaw/package.py +++ b/var/spack/repos/builtin/packages/atompaw/package.py @@ -49,8 +49,8 @@ class Atompaw(AutotoolsPackage): spec = self.spec linalg = spec["lapack"].libs + spec["blas"].libs return [ - "--with-linalg-libs=%s" % linalg.ld_flags, + f"--with-linalg-libs={linalg.ld_flags}", "--enable-libxc", - "--with-libxc-incs=-I%s" % spec["libxc"].prefix.include, - "--with-libxc-libs=-L%s -lxcf90 -lxc" % spec["libxc"].prefix.lib, + f"--with-libxc-incs=-I{spec['libxc'].prefix.include}", + f"--with-libxc-libs=-L{spec['libxc'].prefix.lib} -lxcf90 -lxc", ] diff --git a/var/spack/repos/builtin/packages/audacious/package.py b/var/spack/repos/builtin/packages/audacious/package.py index 4cce09e0fc..1d6634780b 100644 --- a/var/spack/repos/builtin/packages/audacious/package.py +++ b/var/spack/repos/builtin/packages/audacious/package.py @@ -28,7 +28,7 @@ class Audacious(AutotoolsPackage): def patch(self): search_path_args = " ".join(self.autoreconf_search_path_args) - search_path_str = "-I m4 {0}".format(search_path_args) + search_path_str = f"-I m4 {search_path_args}" filter_file("-I m4", search_path_str, "autogen.sh") def autoreconf(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/augustus/package.py b/var/spack/repos/builtin/packages/augustus/package.py index e0e002d6fc..2c5cfa5c0d 100644 --- a/var/spack/repos/builtin/packages/augustus/package.py +++ b/var/spack/repos/builtin/packages/augustus/package.py @@ -69,7 +69,7 @@ class Augustus(MakefilePackage): filter_file("g++", spack_cxx, "makefile", string=True) filter_file( "g++ -I/usr/include/boost", - "{0} -I{1}".format(spack_cxx, self.spec["boost"].prefix.include), + f"{spack_cxx} -I{self.spec['boost'].prefix.include}", "src/subdir.mk", string=True, ) @@ -101,7 +101,7 @@ class Augustus(MakefilePackage): with working_dir(join_path("auxprogs", "filterBam", "src")): makefile = FileFilter("Makefile") - makefile.filter("BAMTOOLS = .*", "BAMTOOLS = {0}".format(bamtools)) + makefile.filter("BAMTOOLS = .*", f"BAMTOOLS = {bamtools}") makefile.filter("INCLUDES = *", "INCLUDES = -I$(BAMTOOLS)/include/bamtools ") if "bamtools@2.5:" in spec: makefile.filter( @@ -113,32 +113,30 @@ class Augustus(MakefilePackage): ) with working_dir(join_path("auxprogs", "bam2hints")): makefile = FileFilter("Makefile") - makefile.filter("/usr/include/bamtools", "{0}/include/bamtools".format(bamtools)) + makefile.filter("/usr/include/bamtools", f"{bamtools}/include/bamtools") if "bamtools@2.5:" in spec: makefile.filter( - "LIBS = -lbamtools -lz", - "LIBS = {0}/lib64" "/libbamtools.a -lz".format(bamtools), + "LIBS = -lbamtools -lz", f"LIBS = {bamtools}/lib64/libbamtools.a -lz" ) if "bamtools@:2.4" in spec: makefile.filter( - "LIBS = -lbamtools -lz", - "LIBS = {0}/lib/bamtools" "/libbamtools.a -lz".format(bamtools), + "LIBS = -lbamtools -lz", f"LIBS = {bamtools}/lib/bamtools/libbamtools.a -lz" ) if self.version < Version("3.4.0"): with working_dir(join_path("auxprogs", "bam2wig")): makefile = FileFilter("Makefile") # point tools to spack installations - makefile.filter("BCFTOOLS=.*$", "BCFTOOLS={0}/include".format(bcftools)) - makefile.filter("SAMTOOLS=.*$", "SAMTOOLS={0}/include".format(samtools)) - makefile.filter("HTSLIB=.*$", "HTSLIB={0}/include".format(htslib)) + makefile.filter("BCFTOOLS=.*$", f"BCFTOOLS={bcftools}/include") + makefile.filter("SAMTOOLS=.*$", f"SAMTOOLS={samtools}/include") + makefile.filter("HTSLIB=.*$", f"HTSLIB={htslib}/include") # fix bad linking dirs makefile.filter("$(SAMTOOLS)/libbam.a", "$(SAMTOOLS)/../lib/libbam.a", string=True) makefile.filter("$(HTSLIB)/libhts.a", "$(HTSLIB)/../lib/libhts.a", string=True) with working_dir(join_path("auxprogs", "checkTargetSortedness")): makefile = FileFilter("Makefile") - makefile.filter("SAMTOOLS.*=.*$", "SAMTOOLS={0}/include".format(samtools)) + makefile.filter("SAMTOOLS.*=.*$", f"SAMTOOLS={samtools}/include") makefile.filter("LIBS=-lbam", "LIBS=$(SAMTOOLS)/../lib/libbam.a", string=True) else: mysql = self.spec["mysql-client"].prefix @@ -147,12 +145,12 @@ class Augustus(MakefilePackage): with working_dir("src"): makefile = FileFilter("Makefile") - makefile.filter(r"/usr/include/mysql\+\+", "{0}/include/mysql++".format(mysqlpp)) + makefile.filter(r"/usr/include/mysql\+\+", f"{mysqlpp}/include/mysql++") if "^mariadb-c-client" in spec: - makefile.filter("/usr/include/mysql", "{0}/include/mariadb".format(mysql)) + makefile.filter("/usr/include/mysql", f"{mysql}/include/mariadb") else: - makefile.filter("/usr/include/mysql", "{0}/include/mysql".format(mysql)) - makefile.filter("/usr/include/lpsolve", "{0}/include/lpsolve".format(lpsolve)) + makefile.filter("/usr/include/mysql", f"{mysql}/include/mysql") + makefile.filter("/usr/include/lpsolve", f"{lpsolve}/include/lpsolve") def install(self, spec, prefix): install_tree("bin", join_path(self.spec.prefix, "bin")) @@ -163,12 +161,12 @@ class Augustus(MakefilePackage): def filter_sbang(self): with working_dir(self.prefix.scripts): pattern = "^#!.*" - repl = "#!{0}".format(self.spec["perl"].command.path) + repl = f"#!{self.spec['perl'].command.path}" files = glob.glob("*.pl") for file in files: filter_file(pattern, repl, *files, backup=False) - repl = "#!{0}".format(self.spec["python"].command.path) + repl = f"#!{self.spec['python'].command.path}" files = glob.glob("*.py") for file in files: filter_file(pattern, repl, *files, backup=False) diff --git a/var/spack/repos/builtin/packages/authd/package.py b/var/spack/repos/builtin/packages/authd/package.py index b2cee813c1..dbb290839b 100644 --- a/var/spack/repos/builtin/packages/authd/package.py +++ b/var/spack/repos/builtin/packages/authd/package.py @@ -20,4 +20,4 @@ class Authd(MakefilePackage): env.prepend_path("PATH", self.prefix.sbin) def install(self, spec, prefix): - make("prefix={0}".format(prefix), "install") + make(f"prefix={prefix}", "install") diff --git a/var/spack/repos/builtin/packages/autodock-vina/package.py b/var/spack/repos/builtin/packages/autodock-vina/package.py index dadf50ea05..8ca01804d8 100644 --- a/var/spack/repos/builtin/packages/autodock-vina/package.py +++ b/var/spack/repos/builtin/packages/autodock-vina/package.py @@ -44,10 +44,10 @@ class AutodockVina(MakefilePackage): with working_dir(self.build_directory): makefile = FileFilter("Makefile") makefile.filter( - "BOOST_INCLUDE = .*", "BOOST_INCLUDE = %s" % self.spec["boost"].prefix.include + "BOOST_INCLUDE = .*", f"BOOST_INCLUDE = {self.spec['boost'].prefix.include}" ) makefile.filter("C_PLATFORM=.*", "C_PLATFORM=-pthread") - makefile.filter("GPP=.*", "GPP=%s" % spack_cxx) + makefile.filter("GPP=.*", f"GPP={spack_cxx}") def build(self, spec, prefix): with working_dir(self.build_directory): diff --git a/var/spack/repos/builtin/packages/autogen/package.py b/var/spack/repos/builtin/packages/autogen/package.py index 2ecc434106..54b088beb5 100644 --- a/var/spack/repos/builtin/packages/autogen/package.py +++ b/var/spack/repos/builtin/packages/autogen/package.py @@ -36,7 +36,7 @@ class Autogen(AutotoolsPackage, GNUMirrorPackage): ] if "+xml" in spec: - args.append("--with-libxml2={0}".format(spec["libxml2"].prefix)) + args.append(f"--with-libxml2={spec['libxml2'].prefix}") else: args.append("--without-libxml2") diff --git a/var/spack/repos/builtin/packages/avizo/package.py b/var/spack/repos/builtin/packages/avizo/package.py index 42c201e780..43364919cd 100644 --- a/var/spack/repos/builtin/packages/avizo/package.py +++ b/var/spack/repos/builtin/packages/avizo/package.py @@ -24,25 +24,25 @@ class Avizo(Package): version( "2020.1", sha256="9321aaa276567eebf116e268353c33a4c930d768d22793f921338e1d8cefe991", - url="file://{0}/Avizo-20201-Linux64-gcc48.bin".format(os.getcwd()), + url=f"file://{os.getcwd()}/Avizo-20201-Linux64-gcc48.bin", expand=False, ) version( "2019.4", sha256="a637720535bcbe254ab56368004a9544c64ec36186373fa24f26cee279685248", - url="file://{0}/Avizo-20194-Linux64-gcc48.bin".format(os.getcwd()), + url=f"file://{os.getcwd()}/Avizo-20194-Linux64-gcc48.bin", expand=False, ) version( "2019.3", sha256="be109df81e2f7238f234862367841dae05e76cc62218c1f36b1d9bc9514ce5f7", - url="file://{0}/Avizo-20193-Linux64-gcc48.bin".format(os.getcwd()), + url=f"file://{os.getcwd()}/Avizo-20193-Linux64-gcc48.bin", expand=False, ) version( "9.7.0", sha256="9c9b9e81957387f4218df0c5adbb80717e9ae80ab3ca6ff8da523f7f499dcc5b", - url="file://{0}/Avizo-970-Linux64-gcc44.bin".format(os.getcwd()), + url=f"file://{os.getcwd()}/Avizo-970-Linux64-gcc44.bin", expand=False, ) @@ -67,15 +67,11 @@ class Avizo(Package): def install(self, spec, prefix): ver = self.version.joined sh = which("sh") - sh( - "Avizo-{0}-Linux64-gcc{1}.bin".format(ver, self.gcc_ver[self.version.string]), - "--noexec", - "--keep", - ) + sh(f"Avizo-{ver}-Linux64-gcc{self.gcc_ver[self.version.string]}.bin", "--noexec", "--keep") with working_dir("Avizo"): avizo_tar = tarfile.open( - name="Avizo-{0}-Linux64-gcc{1}.tar.bz2".format( + name="Avizo-{}-Linux64-gcc{}.tar.bz2".format( self.version, self.gcc_ver[self.version.string] ) ) |