Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/acl/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ def flag_handler(self, name, flags):
return self.build_system_flags(name, flags)

def autoreconf(self, spec, prefix):
bash = which("bash")
bash = which("bash", required=True)
bash("./autogen.sh")
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/adios2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def test_run_executables(self):
f"test_run_executables_{cmd}",
purpose=f"run installed adios2 executable {cmd}",
):
exe = which(join_path(self.prefix.bin, cmd))
exe = which(join_path(self.prefix.bin, cmd), required=True)
exe(*opts)

def test_python(self):
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/adms/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ class Adms(AutotoolsPackage):

@when("@master")
def autoreconf(self, spec, prefix):
sh = which("sh")
sh = which("sh", required=True)
sh("./bootstrap.sh")
4 changes: 2 additions & 2 deletions repos/spack_repo/builtin/packages/alpgen/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ def patch(self):

class MakefileBuilder(makefile.MakefileBuilder):
def build(self, pkg, spec, prefix):
bash = which("bash")
bash = which("bash", required=True)
bash("./cms_build.sh")

def install(self, pkg, spec, prefix):
bash = which("bash")
bash = which("bash", required=True)
bash("./cms_install.sh", prefix)

for root, dirs, files in os.walk(prefix):
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/amdscalapack/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def patch(self):
filter_file("-cpp", "", "CMakeLists.txt")
# remove the C-style comments in header file that cause issues with flang
if self.spec.satisfies("@4.2: %clang@18:"):
which("sed")(
which("sed", required=True)(
"-i",
"1,23d",
join_path(self.stage.source_path, "FRAMEWORK", "SL_Context_fortran_include.h"),
Expand Down
4 changes: 2 additions & 2 deletions repos/spack_repo/builtin/packages/aml/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def cache_test_sources(self):

def test_check_tutorial(self):
"""Compile and run the tutorial tests as install checks"""
cc = which(os.environ["CC"])
cc = which(os.environ["CC"], required=True)
cc_options = [
"-o",
self.smoke_test,
Expand All @@ -136,6 +136,6 @@ def test_check_tutorial(self):
]
cc(*cc_options)

smoke_test = which(self.smoke_test)
smoke_test = which(self.smoke_test, required=True)
out = smoke_test(output=str.split, error=str.split)
assert "Hello world" in out
6 changes: 3 additions & 3 deletions repos/spack_repo/builtin/packages/amrex/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,13 +459,13 @@ def test_run_install_test(self):
args.append("-DCMAKE_PREFIX_PATH=" + ";".join(get_cmake_prefix_path(self)))

args.extend(self.cmake_args())
cmake = which(self.spec["cmake"].prefix.bin.cmake)
cmake = which(self.spec["cmake"].prefix.bin.cmake, required=True)
cmake(*args)

make = which("make")
make = which("make", required=True)
make()

install_test = which("install_test")
install_test = which("install_test", required=True)
inputs_path = join_path(
".", "cache", "amrex", "Tests", "Amr", "Advection_AmrCore", "Exec", "inputs-ci"
)
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/anaconda3/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def url_for_version(self, version):

def install(self, spec, prefix):
dir, anaconda_script = split(self.stage.archive_file)
bash = which("bash")
bash = which("bash", required=True)
bash(anaconda_script, "-b", "-f", "-p", self.prefix)

def setup_run_environment(self, env: EnvironmentModifications) -> None:
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/ant/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ class Ant(Package):

def install(self, spec, prefix):
env["ANT_HOME"] = self.prefix
bash = which("bash")
bash = which("bash", required=True)
bash("./build.sh", "install-lite")
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/aocc/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def cfg_files(self):
if self.spec.satisfies("@:5 %gcc") and self.compiler.prefix != "/usr":
# help flang{1,2} find libquadmath
libdir = self._libquadmath_dir()
patchelf = which("patchelf")
patchelf = which("patchelf", required=True)
patchelf.add_default_arg("--set-rpath", libdir)
patchelf(join_path(self.prefix.bin, "flang1"))
patchelf(join_path(self.prefix.bin, "flang2"))
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/aocl_da/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def cmake_args(self):
@on_package_attributes(run_tests=True)
def test_python(self):
"""Perform smoke tests on the installed package."""
pytest = which("pytest")
pytest = which("pytest", required=True)
envmod = EnvironmentModifications()
envmod.append_path("PYTHONPATH", join_path(self.prefix, "python_package"))
pytest.add_default_envmod(envmod)
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/apktool/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setup_build_environment(self, env: EnvironmentModifications) -> None:
def install(self, spec, prefix):
gradlew = Executable("./gradlew")
gradlew("--info", "--debug", "build", "shadowJar")
ln = which("ln")
ln = which("ln", required=True)
mkdir(join_path(prefix, "bin"))
install(
join_path("brut.apktool", "apktool-cli", "build", "libs", "apktool-cli-all.jar"),
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/apr_util/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def configure_args(self):
if spec.satisfies("+crypto ^openssl~shared"):
# Need pkg-config to get zlib and -ldl flags
# (see https://dev.apr.apache.narkive.com/pNnO9F1S/configure-bug-openssl)
pkgconf = which("pkg-config")
pkgconf = which("pkg-config", required=True)
ssl_libs = pkgconf("--libs", "--static", "openssl", output=str)
args.append(f"LIBS={ssl_libs}")

Expand Down
6 changes: 3 additions & 3 deletions repos/spack_repo/builtin/packages/arborx/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ def test_run_ctest(self):
]
if self.spec.satisfies("+mpi"):
cmake_args.append(self.define("MPI_HOME", self.spec["mpi"].prefix))
cmake = which(self.spec["cmake"].prefix.bin.cmake)
make = which("make")
ctest = which("ctest")
cmake = which(self.spec["cmake"].prefix.bin.cmake, required=True)
make = which("make", required=True)
ctest = which("ctest", required=True)

with working_dir(self.cached_tests_work_dir):
cmake(*cmake_args)
Expand Down
4 changes: 2 additions & 2 deletions repos/spack_repo/builtin/packages/archer/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def test_run_parallel_example(self):
test_exe = "parallel-simple"
test_src = f"{test_exe}.c"
with working_dir(test_dir):
clang = which("clang-archer")
clang = which("clang-archer", required=True)
clang("-o", test_exe, test_src)

parallel_simple = which(test_exe)
parallel_simple = which(test_exe, required=True)
parallel_simple()
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/aretomo/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def install(self, spec, prefix):

@run_after("install")
def ensure_rpaths(self):
patchelf = which("patchelf")
patchelf = which("patchelf", required=True)
patchelf(
"--set-rpath", self.spec["cuda"].prefix.lib64, join_path(self.prefix.bin, "AreTomo")
)
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/armpl_gcc/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ class ArmplGcc(Package):
# Run the installer with the desired install directory
def install(self, spec, prefix):
if spec.platform == "darwin":
hdiutil = which("hdiutil")
hdiutil = which("hdiutil", required=True)
# Mount image
mountpoint = os.path.join(self.stage.path, "mount")
if spec.satisfies("@:23"):
Expand Down
4 changes: 2 additions & 2 deletions repos/spack_repo/builtin/packages/aspera_cli/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def install(self, spec, prefix):
stop_at="__ARCHIVE_FOLLOWS__",
)
# Install
chmod = which("chmod")
chmod = which("chmod", required=True)
chmod("+x", runfile)
runfile = which(runfile)
runfile = which(runfile, required=True)
runfile()
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/astra/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def install(self, spec, prefix):
install("lineplot/lineplot", prefix.bin)
install("pgxwin_server/pgxwin_server", prefix.bin)

chmod = which("chmod")
chmod = which("chmod", required=True)
chmod("+x", join_path(prefix.bin, "Astra"))
chmod("+x", join_path(prefix.bin, "generator"))
if spec.satisfies("+gui"):
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/audacious/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def patch(self):
filter_file("-I m4", search_path_str, "autogen.sh")

def autoreconf(self, spec, prefix):
bash = which("bash")
bash = which("bash", required=True)
bash("./autogen.sh")

def configure_args(self):
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/avizo/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def setup_run_environment(self, env: EnvironmentModifications) -> None:

def install(self, spec, prefix):
ver = self.version.joined
sh = which("sh")
sh = which("sh", required=True)
sh(f"Avizo-{ver}-Linux64-gcc{self.gcc_ver[self.version.string]}.bin", "--noexec", "--keep")

with working_dir("Avizo"):
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/bats/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ class Bats(Package):
)

def install(self, spec, prefix):
bash = which("bash")
bash = which("bash", required=True)
bash("./install.sh", prefix)
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/bazel/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def setup_build_environment(self, env: EnvironmentModifications) -> None:

@run_before("install")
def bootstrap(self):
bash = which("bash")
bash = which("bash", required=True)
bash("./compile.sh")

def install(self, spec, prefix):
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/beast_tracer/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class BeastTracer(Package):
depends_on("java", type=("build", "run"))

def install(self, spec, prefix):
ant = which("ant")
ant = which("ant", required=True)
ant("dist")

mkdirp(prefix.bin)
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/berkeley_db/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def check_exe_version(self, exe):
if not os.path.exists(installed_exe):
raise SkipTest(f"{exe} is not installed")

exe = which(installed_exe)
exe = which(installed_exe, required=True)
out = exe("-V", output=str.split, error=str.split)
assert self.spec.version.string in out

Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/berkeleygw/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Berkeleygw(MakefilePackage):

def edit(self, spec, prefix):
# archive is a tar file, despite the .gz expension
tar = which("tar")
tar = which("tar", required=True)
tar("-x", "-o", "-f", self.stage.archive_file, "--strip-components=1")

# get generic arch.mk template
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/binutils/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def test_binaries(self):
if not os.path.exists(installed_exe):
raise SkipTest("{0} is not installed".format(_bin))

exe = which(installed_exe)
exe = which(installed_exe, required=True)
out = exe("--version", output=str.split, error=str.split)
assert version in out

Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/biobambam2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ def test_short_sort(self):
"""run testshortsort.sh to check alignments sorted by coordinate"""
test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)
with working_dir(test_dir):
sh = which("sh")
sh = which("sh", required=True)
out = sh("testshortsort.sh", output=str.split, error=str.split)
assert "Alignments sorted by coordinate." in out
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/blast2go/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ def install(self, spec, prefix):
f.writelines(config_input_data)

with open(config_input_file, "r") as f:
bash = which("bash")
bash = which("bash", required=True)
bash("Blast2GO_unix_%s.sh" % self.version.underscored, input=f)
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/bmake/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def patch(self):
filter_file("GetDir /bmake", "GetDir " + self.stage.source_path, "boot-strap", string=True)

def install(self, spec, prefix):
sh = which("sh")
sh = which("sh", required=True)
sh("boot-strap", "op=configure")
sh("boot-strap", "op=build")
sh("boot-strap", "--prefix={0}".format(prefix), "op=install")
4 changes: 2 additions & 2 deletions repos/spack_repo/builtin/packages/bolt/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_sample_nested_example(self):

test_dir = os.path.dirname(path)
with working_dir(test_dir):
cxx = which(os.environ["CXX"])
cxx = which(os.environ["CXX"], required=True)
cxx(
"-L{0}".format(self.prefix.lib),
"-I{0}".format(self.prefix.include),
Expand All @@ -82,5 +82,5 @@ def test_sample_nested_example(self):
"-lbolt",
)

sample_nested = which(exe)
sample_nested = which(exe, required=True)
sample_nested()
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/bracken/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Bracken(Package):
def install(self, spec, prefix):
mkdirp(prefix.bin.src)
# installer builds kmer2read_distr in src
chmod = which("chmod")
chmod = which("chmod", required=True)
chmod("+x", "./install_bracken.sh")
installer = Executable("./install_bracken.sh")
installer(self.stage.source_path)
Expand Down
4 changes: 2 additions & 2 deletions repos/spack_repo/builtin/packages/bricks/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ def test_bricklib_example(self):
raise SkipTest("{0} is missing".format(source_dir))

with working_dir(source_dir):
cmake = which(self.spec["cmake"].prefix.bin.cmake)
cmake = which(self.spec["cmake"].prefix.bin.cmake, required=True)
cmake(".")

cmake("--build", ".")

example = which("example")
example = which("example", required=True)
example()
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/brltty/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ class Brltty(AutotoolsPackage):
depends_on("alsa-lib", when="platform=linux", type="link")

def autoreconf(self, spec, prefix):
bash = which("bash")
bash = which("bash", required=True)
bash("autogen")
4 changes: 2 additions & 2 deletions repos/spack_repo/builtin/packages/c/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class C(Package):

def test_c(self):
"""build and run C examples"""
cc = which(os.environ["CC"])
cc = which(os.environ["CC"], required=True)
expected = ["Hello world", "YES!"]

test_source = self.test_suite.current_test_data_dir
Expand All @@ -26,6 +26,6 @@ def test_c(self):
with test_part(self, f"test_c_{test}", f"build and run {exe_name}"):
filepath = join_path(test_source, test)
cc("-o", exe_name, filepath)
exe = which(exe_name)
exe = which(exe_name, required=True)
out = exe(output=str.split, error=str.split)
check_outputs(expected, out)
4 changes: 2 additions & 2 deletions repos/spack_repo/builtin/packages/cairo/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class AutotoolsBuilder(autotools.AutotoolsBuilder):
def autoreconf(self, pkg, spec, prefix):
# Regenerate, directing the script *not* to call configure before Spack
# does
which("sh")("./autogen.sh", extra_env={"NOCONFIGURE": "1"})
which("sh", required=True)("./autogen.sh", extra_env={"NOCONFIGURE": "1"})

def configure_args(self):
args = ["--disable-trace", "--enable-tee"] # can cause problems with libiberty
Expand All @@ -197,7 +197,7 @@ def configure_args(self):
args.extend(self.with_or_without("pic"))

if self.spec.satisfies("+ft ^freetype~shared"):
pkgconf = which("pkg-config")
pkgconf = which("pkg-config", required=True)
ldflags = pkgconf("--libs-only-L", "--static", "freetype2", output=str)
libs = pkgconf("--libs-only-l", "--static", "freetype2", output=str)
args.append(f"LDFLAGS={ldflags}")
Expand Down
4 changes: 2 additions & 2 deletions repos/spack_repo/builtin/packages/caliper/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def test_cxx_example(self):

lib_dir = self.prefix.lib if os.path.exists(self.prefix.lib) else self.prefix.lib64

cxx = which(os.environ["CXX"])
cxx = which(os.environ["CXX"], required=True)
test_dir = os.path.dirname(source_path)
with working_dir(test_dir):
cxx(
Expand All @@ -316,5 +316,5 @@ def test_cxx_example(self):
"-lstdc++",
)

cxx_example = which(exe)
cxx_example = which(exe, required=True)
cxx_example()
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/cgdb/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Cgdb(AutotoolsPackage):

@when("@master")
def autoreconf(self, spec, prefix):
sh = which("sh")
sh = which("sh", required=True)
sh("autogen.sh")

def configure_args(self):
Expand Down
Loading
Loading