unmaintained a* packages: update to use f-strings (#40467)
This commit is contained in:
parent
7ecb9243c1
commit
cbf9dd0aee
42 changed files with 137 additions and 164 deletions
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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 @@ def configure_args(self):
|
|||
|
||||
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 @@ def configure_args(self):
|
|||
"--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 @@ def configure_args(self):
|
|||
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 @@ def configure_args(self):
|
|||
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 @@ def configure_args(self):
|
|||
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 @@ def configure_args(self):
|
|||
# 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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -43,4 +43,4 @@ def edit(self, spec, prefix):
|
|||
"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}")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -29,7 +29,7 @@ def setup_build_environment(self, spack_env):
|
|||
|
||||
@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):
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -30,7 +30,7 @@ def edit(self, spec, prefix):
|
|||
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)
|
||||
|
|
|
@ -30,8 +30,8 @@ def configure_args(self):
|
|||
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
|
||||
|
|
|
@ -46,9 +46,9 @@ def build_targets(self):
|
|||
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
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ def cmake_args(self):
|
|||
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"):
|
||||
|
|
|
@ -117,9 +117,7 @@ def cmake_args(self):
|
|||
):
|
||||
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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -23,9 +23,9 @@ def install(self, spec, prefix):
|
|||
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}",
|
||||
]
|
||||
)
|
||||
|
||||
|
|
|
@ -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 @@ def configure_args(self):
|
|||
]
|
||||
|
||||
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")
|
||||
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -38,9 +38,9 @@ def patch(self):
|
|||
|
||||
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 @@ def test_run_parallel_example(self):
|
|||
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)
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -66,14 +66,14 @@ def cmake_args(self):
|
|||
|
||||
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"),
|
||||
]
|
||||
|
|
|
@ -150,14 +150,14 @@ def configure_args(self):
|
|||
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -35,12 +35,12 @@ def build_targets(self):
|
|||
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -29,7 +29,7 @@ def install(self, spec, prefix):
|
|||
# Update destination path
|
||||
filter_file(
|
||||
"INSTALL_DIR=~/.aspera",
|
||||
"INSTALL_DIR=%s" % prefix,
|
||||
f"INSTALL_DIR={prefix}",
|
||||
runfile,
|
||||
string=True,
|
||||
stop_at="__ARCHIVE_FOLLOWS__",
|
||||
|
|
|
@ -31,7 +31,7 @@ def install(self, spec, prefix):
|
|||
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")
|
||||
|
|
|
@ -30,11 +30,11 @@ def build_directory(self):
|
|||
|
||||
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}"]
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -45,7 +45,7 @@ def patch(self):
|
|||
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"))
|
||||
|
|
|
@ -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 @@ def install(self, spec, prefix):
|
|||
|
||||
@when("@:2.27")
|
||||
def install(self, spec, prefix):
|
||||
configure("--prefix={0}".format(prefix))
|
||||
configure(f"--prefix={prefix}")
|
||||
make()
|
||||
if self.run_tests:
|
||||
make("check")
|
||||
|
|
|
@ -109,11 +109,11 @@ def install(self, spec, prefix):
|
|||
|
||||
# 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 @@ def install_test(self):
|
|||
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)
|
||||
|
|
|
@ -24,8 +24,8 @@ def edit(self, spec, prefix):
|
|||
@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",
|
||||
]
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ def configure_args(self):
|
|||
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",
|
||||
]
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -69,7 +69,7 @@ def edit(self, spec, prefix):
|
|||
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 @@ def edit(self, spec, prefix):
|
|||
|
||||
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 @@ def edit(self, spec, prefix):
|
|||
)
|
||||
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 @@ def edit(self, spec, prefix):
|
|||
|
||||
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 @@ def install(self, spec, prefix):
|
|||
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)
|
||||
|
|
|
@ -20,4 +20,4 @@ def setup_run_environment(self, env):
|
|||
env.prepend_path("PATH", self.prefix.sbin)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
make("prefix={0}".format(prefix), "install")
|
||||
make(f"prefix={prefix}", "install")
|
||||
|
|
|
@ -44,10 +44,10 @@ def edit(self, spec, prefix):
|
|||
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):
|
||||
|
|
|
@ -36,7 +36,7 @@ def configure_args(self):
|
|||
]
|
||||
|
||||
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")
|
||||
|
||||
|
|
|
@ -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 @@ def setup_run_environment(self, env):
|
|||
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]
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue