diff --git a/var/spack/repos/builtin/packages/acfl/package.py b/var/spack/repos/builtin/packages/acfl/package.py index 4df06448984..588eb5f4ad6 100644 --- a/var/spack/repos/builtin/packages/acfl/package.py +++ b/var/spack/repos/builtin/packages/acfl/package.py @@ -386,7 +386,6 @@ def blas_libs(self): [libname, "libamath", "libastring"], root=armpl_prefix, shared=self.spec.satisfies("+shared"), - recursive=True, ) armpl_libs += find_system_libraries(["libm"]) diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index 76ca3b0c9f1..2efb9337067 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -350,7 +350,7 @@ def libs(self): libs_to_seek.add("libadios2_fortran") return find_libraries( - list(libs_to_seek), root=self.spec.prefix, shared=("+shared" in spec), recursive=True + list(libs_to_seek), root=self.spec.prefix, shared=("+shared" in spec) ) def setup_run_environment(self, env): diff --git a/var/spack/repos/builtin/packages/amdblis/package.py b/var/spack/repos/builtin/packages/amdblis/package.py index a25f5a3c937..7f60c3be935 100644 --- a/var/spack/repos/builtin/packages/amdblis/package.py +++ b/var/spack/repos/builtin/packages/amdblis/package.py @@ -119,5 +119,4 @@ def libs(self): ["libblis"] if self.spec.satisfies("threads=none") else ["libblis-mt"], root=self.prefix, shared=self.spec.satisfies("libs=shared"), - recursive=True, ) diff --git a/var/spack/repos/builtin/packages/amdlibflame/package.py b/var/spack/repos/builtin/packages/amdlibflame/package.py index d74fc4be911..14b0903de37 100644 --- a/var/spack/repos/builtin/packages/amdlibflame/package.py +++ b/var/spack/repos/builtin/packages/amdlibflame/package.py @@ -110,16 +110,12 @@ class Amdlibflame(CMakePackage, LibflameBase): @property def lapack_libs(self): """find lapack_libs function""" - return find_libraries( - "libflame", root=self.prefix, shared="+shared" in self.spec, recursive=True - ) + return find_libraries("libflame", root=self.prefix, shared="+shared" in self.spec) @property def libs(self): """find libflame libs function""" - return find_libraries( - "libflame", root=self.prefix, shared="+shared" in self.spec, recursive=True - ) + return find_libraries("libflame", root=self.prefix, shared="+shared" in self.spec) def flag_handler(self, name, flags): if name == "cflags": diff --git a/var/spack/repos/builtin/packages/aocl-libmem/package.py b/var/spack/repos/builtin/packages/aocl-libmem/package.py index d0169362255..fc37361b115 100644 --- a/var/spack/repos/builtin/packages/aocl-libmem/package.py +++ b/var/spack/repos/builtin/packages/aocl-libmem/package.py @@ -67,7 +67,7 @@ class AoclLibmem(CMakePackage): def libs(self): """find libmem libs function""" shared = "+shared" in self.spec - return find_libraries("libaocl-libmem", root=self.prefix, recursive=True, shared=shared) + return find_libraries("libaocl-libmem", root=self.prefix, shared=shared) def cmake_args(self): """Runs ``cmake`` in the build directory""" diff --git a/var/spack/repos/builtin/packages/aocl-sparse/package.py b/var/spack/repos/builtin/packages/aocl-sparse/package.py index eb438a130c5..0252ba63f93 100644 --- a/var/spack/repos/builtin/packages/aocl-sparse/package.py +++ b/var/spack/repos/builtin/packages/aocl-sparse/package.py @@ -77,9 +77,7 @@ class AoclSparse(CMakePackage): @property def libs(self): """find libaoclsparse libs function""" - return find_libraries( - "libaoclsparse", root=self.prefix, shared="+shared" in self.spec, recursive=True - ) + return find_libraries("libaoclsparse", root=self.prefix, shared="+shared" in self.spec) @property def build_directory(self): diff --git a/var/spack/repos/builtin/packages/aocl-utils/package.py b/var/spack/repos/builtin/packages/aocl-utils/package.py index 343b4eb11eb..d02c451c905 100644 --- a/var/spack/repos/builtin/packages/aocl-utils/package.py +++ b/var/spack/repos/builtin/packages/aocl-utils/package.py @@ -57,7 +57,7 @@ class AoclUtils(CMakePackage): def libs(self): """find aocl-utils libs function""" shared = "+shared" in self.spec - return find_libraries("libaoclutils", root=self.prefix, recursive=True, shared=shared) + return find_libraries("libaoclutils", root=self.prefix, shared=shared) def cmake_args(self): args = [ diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py index 4fba7209e46..c5b5ada2f16 100644 --- a/var/spack/repos/builtin/packages/apr-util/package.py +++ b/var/spack/repos/builtin/packages/apr-util/package.py @@ -40,9 +40,7 @@ class AprUtil(AutotoolsPackage): @property def libs(self): - return find_libraries( - [f"libaprutil-{self.version.up_to(1)}"], root=self.prefix, recursive=True - ) + return find_libraries([f"libaprutil-{self.version.up_to(1)}"], root=self.prefix) def configure_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/apr/package.py b/var/spack/repos/builtin/packages/apr/package.py index 6b1eac1282b..b91d0b69eaa 100644 --- a/var/spack/repos/builtin/packages/apr/package.py +++ b/var/spack/repos/builtin/packages/apr/package.py @@ -33,6 +33,4 @@ class Apr(AutotoolsPackage): @property def libs(self): - return find_libraries( - [f"libapr-{self.version.up_to(1)}"], root=self.prefix, recursive=True - ) + return find_libraries([f"libapr-{self.version.up_to(1)}"], root=self.prefix) diff --git a/var/spack/repos/builtin/packages/armcomputelibrary/package.py b/var/spack/repos/builtin/packages/armcomputelibrary/package.py index d3d0e62928a..d4ede5af4c9 100644 --- a/var/spack/repos/builtin/packages/armcomputelibrary/package.py +++ b/var/spack/repos/builtin/packages/armcomputelibrary/package.py @@ -133,7 +133,6 @@ def libs(self): ["libarm_compute", "libarm_compute_core", "libarm_compute_graph"], root=self.spec.prefix, shared=True, - recursive=True, ) return acl_libs diff --git a/var/spack/repos/builtin/packages/armpl-gcc/package.py b/var/spack/repos/builtin/packages/armpl-gcc/package.py index 25f187781e4..fbe1a99f76c 100644 --- a/var/spack/repos/builtin/packages/armpl-gcc/package.py +++ b/var/spack/repos/builtin/packages/armpl-gcc/package.py @@ -457,7 +457,6 @@ def blas_libs(self): [libname, "libamath", "libastring"], root=armpl_prefix, shared=self.spec.satisfies("+shared"), - recursive=True, ) armpl_libs += find_system_libraries(["libm"]) diff --git a/var/spack/repos/builtin/packages/arpack-ng/package.py b/var/spack/repos/builtin/packages/arpack-ng/package.py index 564c684e38a..ae20d17281a 100644 --- a/var/spack/repos/builtin/packages/arpack-ng/package.py +++ b/var/spack/repos/builtin/packages/arpack-ng/package.py @@ -112,7 +112,7 @@ def libs(self): if self.spec.satisfies("+mpi"): libraries = ["libparpack"] + libraries - return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=True) class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): diff --git a/var/spack/repos/builtin/packages/arrayfire/package.py b/var/spack/repos/builtin/packages/arrayfire/package.py index 2e67af18d10..33275f5c29e 100644 --- a/var/spack/repos/builtin/packages/arrayfire/package.py +++ b/var/spack/repos/builtin/packages/arrayfire/package.py @@ -67,7 +67,7 @@ def libs(self): if not query_parameters or "unified" in query_parameters: libraries.append("libaf") - return find_libraries(libraries, root=self.prefix, recursive=True) + return find_libraries(libraries, root=self.prefix) def cmake_args(self): args = [] diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index 207f67c250f..a2f9008b3da 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -152,7 +152,7 @@ def libs(self): ) to_find = ["liblapack"] + interfaces + ["libatlas"] shared = False - return find_libraries(to_find, root=self.prefix, shared=shared, recursive=True) + return find_libraries(to_find, root=self.prefix, shared=shared) def install_test(self): source_file = join_path(os.path.dirname(self.module.__file__), "test_cblas_dgemm.c") diff --git a/var/spack/repos/builtin/packages/bigdft-atlab/package.py b/var/spack/repos/builtin/packages/bigdft-atlab/package.py index 0c023efc9e0..c4f7024238e 100644 --- a/var/spack/repos/builtin/packages/bigdft-atlab/package.py +++ b/var/spack/repos/builtin/packages/bigdft-atlab/package.py @@ -99,4 +99,4 @@ def configure_args(self): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libatlab-*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libatlab-*", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/bigdft-chess/package.py b/var/spack/repos/builtin/packages/bigdft-chess/package.py index d407d6f1c3f..20e3b5d6c46 100644 --- a/var/spack/repos/builtin/packages/bigdft-chess/package.py +++ b/var/spack/repos/builtin/packages/bigdft-chess/package.py @@ -120,4 +120,4 @@ def configure_args(self): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libCheSS-*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libCheSS-*", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/bigdft-core/package.py b/var/spack/repos/builtin/packages/bigdft-core/package.py index 2c885fafc2d..7b54f461505 100644 --- a/var/spack/repos/builtin/packages/bigdft-core/package.py +++ b/var/spack/repos/builtin/packages/bigdft-core/package.py @@ -134,4 +134,4 @@ def configure_args(self): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libbigdft-*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libbigdft-*", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/bigdft-futile/package.py b/var/spack/repos/builtin/packages/bigdft-futile/package.py index 99bf739a1d0..3064edea5a3 100644 --- a/var/spack/repos/builtin/packages/bigdft-futile/package.py +++ b/var/spack/repos/builtin/packages/bigdft-futile/package.py @@ -105,4 +105,4 @@ def configure_args(self): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libfutile-*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libfutile-*", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/bigdft-libabinit/package.py b/var/spack/repos/builtin/packages/bigdft-libabinit/package.py index 33e6363d849..f9e714b526b 100644 --- a/var/spack/repos/builtin/packages/bigdft-libabinit/package.py +++ b/var/spack/repos/builtin/packages/bigdft-libabinit/package.py @@ -87,4 +87,4 @@ def configure_args(self): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libabinit", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libabinit", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/bigdft-liborbs/package.py b/var/spack/repos/builtin/packages/bigdft-liborbs/package.py index 80545c7db54..e7225cf9390 100644 --- a/var/spack/repos/builtin/packages/bigdft-liborbs/package.py +++ b/var/spack/repos/builtin/packages/bigdft-liborbs/package.py @@ -90,4 +90,4 @@ def configure_args(self): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libbigdft-*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libbigdft-*", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/bigdft-psolver/package.py b/var/spack/repos/builtin/packages/bigdft-psolver/package.py index 570622ab3a2..4768f7732d4 100644 --- a/var/spack/repos/builtin/packages/bigdft-psolver/package.py +++ b/var/spack/repos/builtin/packages/bigdft-psolver/package.py @@ -108,4 +108,4 @@ def configure_args(self): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libPSolver-*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libPSolver-*", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/bigdft-spred/package.py b/var/spack/repos/builtin/packages/bigdft-spred/package.py index 796c10d98e5..2b600c3b962 100644 --- a/var/spack/repos/builtin/packages/bigdft-spred/package.py +++ b/var/spack/repos/builtin/packages/bigdft-spred/package.py @@ -105,4 +105,4 @@ def configure_args(self): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libspred-*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libspred-*", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 0dbb60ae9b8..9de18a62481 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -172,7 +172,7 @@ def libs(self): libnames += ["monitor"] libraries = ["libboost_*%s*" % lib for lib in libnames] - return find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=shared) variant( "context-impl", diff --git a/var/spack/repos/builtin/packages/brunsli/package.py b/var/spack/repos/builtin/packages/brunsli/package.py index 528ebc70ef9..349b8d252b3 100644 --- a/var/spack/repos/builtin/packages/brunsli/package.py +++ b/var/spack/repos/builtin/packages/brunsli/package.py @@ -23,6 +23,4 @@ class Brunsli(CMakePackage): @property def libs(self): - return find_libraries( - ["libbrunslidec-c", "libbrunslienc-c"], root=self.prefix, recursive=True - ) + return find_libraries(["libbrunslidec-c", "libbrunslienc-c"], root=self.prefix) diff --git a/var/spack/repos/builtin/packages/bufr/package.py b/var/spack/repos/builtin/packages/bufr/package.py index be3431fe6a1..ef4e480dabd 100644 --- a/var/spack/repos/builtin/packages/bufr/package.py +++ b/var/spack/repos/builtin/packages/bufr/package.py @@ -108,7 +108,7 @@ def _setup_bufr_environment(self, env, suffix): shared = True if "+shared" in self.spec else False # Bufr has _DA (dynamic allocation) libs in versions <= 11.5.0 append = "" if self.spec.satisfies("@11.5.0:") else "_DA" - lib = find_libraries(libname + append, root=self.prefix, shared=shared, recursive=True) + lib = find_libraries(libname + append, root=self.prefix, shared=shared) lib_envname = "BUFR_LIB{0}".format(suffix) + append inc_envname = "BUFR_INC{0}".format(suffix) + append include_dir = "{0}_{1}".format(self.prefix.include.bufr, suffix) diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py index 7bcb0bfc342..f2fc8f79458 100644 --- a/var/spack/repos/builtin/packages/bzip2/package.py +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -61,7 +61,7 @@ def determine_version(cls, exe): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libbz2", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libbz2", root=self.prefix, shared=shared) def flag_handler(self, name, flags): if name == "cflags": diff --git a/var/spack/repos/builtin/packages/c-ares/package.py b/var/spack/repos/builtin/packages/c-ares/package.py index 51fb1dc9da2..e8c646130b3 100644 --- a/var/spack/repos/builtin/packages/c-ares/package.py +++ b/var/spack/repos/builtin/packages/c-ares/package.py @@ -30,4 +30,4 @@ def url_for_version(self, version): @property def libs(self): - return find_libraries(["libcares"], root=self.prefix, recursive=True) + return find_libraries(["libcares"], root=self.prefix) diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py index 28919db0661..fc4d0750848 100644 --- a/var/spack/repos/builtin/packages/c-blosc/package.py +++ b/var/spack/repos/builtin/packages/c-blosc/package.py @@ -49,7 +49,7 @@ class CBlosc(CMakePackage): @property def libs(self): - return find_libraries("libblosc", root=self.prefix, recursive=True) + return find_libraries("libblosc", root=self.prefix) def cmake_args(self): args = [] diff --git a/var/spack/repos/builtin/packages/cray-fftw/package.py b/var/spack/repos/builtin/packages/cray-fftw/package.py index 13526ecc618..3fbeed8485c 100644 --- a/var/spack/repos/builtin/packages/cray-fftw/package.py +++ b/var/spack/repos/builtin/packages/cray-fftw/package.py @@ -71,4 +71,4 @@ def libs(self): libraries.append("libfftw3" + sfx) - return find_libraries(libraries, root=self.prefix, recursive=True) + return find_libraries(libraries, root=self.prefix) diff --git a/var/spack/repos/builtin/packages/cray-mpich/package.py b/var/spack/repos/builtin/packages/cray-mpich/package.py index 7e8bc574421..f2a42e5f6d6 100644 --- a/var/spack/repos/builtin/packages/cray-mpich/package.py +++ b/var/spack/repos/builtin/packages/cray-mpich/package.py @@ -109,7 +109,7 @@ def install(self, spec, prefix): @property def headers(self): - hdrs = find_headers("mpi", self.prefix.include, recursive=True) + hdrs = find_headers("mpi", self.prefix.include) hdrs.directories = os.path.dirname(hdrs[0]) return hdrs @@ -128,7 +128,4 @@ def libs(self): if "f90" in query_parameters: libraries.extend(["libmpif90", "libmpichf90"]) - libs = find_libraries(libraries, root=self.prefix.lib, recursive=True) - libs += find_libraries(libraries, root=self.prefix.lib64, recursive=True) - - return libs + return find_libraries(libraries, root=self.prefix) diff --git a/var/spack/repos/builtin/packages/cray-pmi/package.py b/var/spack/repos/builtin/packages/cray-pmi/package.py index 736f8848f00..938cb8b8f85 100644 --- a/var/spack/repos/builtin/packages/cray-pmi/package.py +++ b/var/spack/repos/builtin/packages/cray-pmi/package.py @@ -20,8 +20,8 @@ class CrayPmi(Package): @property def headers(self): - return find_headers("pmi", self.prefix.include, recursive=True) + return find_headers("pmi", self.prefix) @property def libs(self): - return find_libraries(["libpmi"], root=self.prefix, recursive=True) + return find_libraries(["libpmi"], root=self.prefix) diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index bd1ff959f2a..4c72ddb9c93 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -795,7 +795,7 @@ def install(self, spec, prefix): @property def libs(self): - libs = find_libraries("libcudart", root=self.prefix, shared=True, recursive=True) + libs = find_libraries("libcudart", root=self.prefix, shared=True) filtered_libs = [] # CUDA 10.0 provides Compatability libraries for running newer versions diff --git a/var/spack/repos/builtin/packages/dd4hep/package.py b/var/spack/repos/builtin/packages/dd4hep/package.py index aadaa4651d5..fa73b330780 100644 --- a/var/spack/repos/builtin/packages/dd4hep/package.py +++ b/var/spack/repos/builtin/packages/dd4hep/package.py @@ -149,7 +149,7 @@ def libs(self): # We need to override libs here, because we don't build a libdd4hep so # the default discovery fails. All libraries that are built by DD4hep # start with libDD - return find_libraries("libDD*", root=self.prefix, shared=True, recursive=True) + return find_libraries("libDD*", root=self.prefix, shared=True) def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/dihydrogen/package.py b/var/spack/repos/builtin/packages/dihydrogen/package.py index 3ab48b7c391..e224fa56be7 100644 --- a/var/spack/repos/builtin/packages/dihydrogen/package.py +++ b/var/spack/repos/builtin/packages/dihydrogen/package.py @@ -233,7 +233,7 @@ class Dihydrogen(CachedCMakePackage, CudaPackage, ROCmPackage): @property def libs(self): shared = True if "+shared" in self.spec else False - return find_libraries("libH2Core", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libH2Core", root=self.prefix, shared=shared) def cmake_args(self): args = [] diff --git a/var/spack/repos/builtin/packages/dislin/package.py b/var/spack/repos/builtin/packages/dislin/package.py index ded925de995..9b90a6efc42 100644 --- a/var/spack/repos/builtin/packages/dislin/package.py +++ b/var/spack/repos/builtin/packages/dislin/package.py @@ -35,7 +35,7 @@ def libs(self): key = tuple(query_parameters) libraries = query2libraries[key] - return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=True) def setup_build_environment(self, env): env.set("DISLIN", self.prefix) diff --git a/var/spack/repos/builtin/packages/dsfmt/package.py b/var/spack/repos/builtin/packages/dsfmt/package.py index 1c44116a31e..cb543fb34d0 100644 --- a/var/spack/repos/builtin/packages/dsfmt/package.py +++ b/var/spack/repos/builtin/packages/dsfmt/package.py @@ -28,7 +28,7 @@ class Dsfmt(MakefilePackage): @property def libs(self): - return find_libraries("libdSFMT", root=self.prefix, recursive=True) + return find_libraries("libdSFMT", root=self.prefix) def build(self, spec, prefix): make("build-library", "CC=cc") diff --git a/var/spack/repos/builtin/packages/dyninst/package.py b/var/spack/repos/builtin/packages/dyninst/package.py index cca8a3026eb..2130e4862e6 100644 --- a/var/spack/repos/builtin/packages/dyninst/package.py +++ b/var/spack/repos/builtin/packages/dyninst/package.py @@ -168,13 +168,13 @@ def cmake_args(self): # Elf -- the directory containing libelf.h. elf = spec["elf"].prefix - elf_include = os.path.dirname(find_headers("libelf", elf.include, recursive=True)[0]) + elf_include = os.path.dirname(find_headers("libelf", elf.include)[0]) # Dwarf -- the directory containing elfutils/libdw.h or # libdwarf.h, and the path to libdw.so or libdwarf.so. if spec.satisfies("@10.0.0:"): dwarf_include = elf.include - dwarf_lib = find_libraries("libdw", elf, recursive=True) + dwarf_lib = find_libraries("libdw", elf) else: dwarf_include = spec["libdwarf"].prefix.include dwarf_lib = spec["libdwarf"].libs diff --git a/var/spack/repos/builtin/packages/eccodes/package.py b/var/spack/repos/builtin/packages/eccodes/package.py index d05aeaa4873..dc11fc97643 100644 --- a/var/spack/repos/builtin/packages/eccodes/package.py +++ b/var/spack/repos/builtin/packages/eccodes/package.py @@ -295,7 +295,7 @@ def libs(self): if return_memfs: libraries.append("libeccodes_memfs") - libs = find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + libs = find_libraries(libraries, root=self.prefix, shared=shared) if libs and len(libs) == len(libraries): return libs diff --git a/var/spack/repos/builtin/packages/egl/package.py b/var/spack/repos/builtin/packages/egl/package.py index c0ef7824250..e115a92678f 100644 --- a/var/spack/repos/builtin/packages/egl/package.py +++ b/var/spack/repos/builtin/packages/egl/package.py @@ -78,15 +78,15 @@ def libs(self): @property def egl_headers(self): header_name = "GL/gl" - gl_header = find_headers(header_name, root=self.prefix, recursive=True) + gl_header = find_headers(header_name, root=self.prefix) header_name = "EGL/egl" - egl_header = find_headers(header_name, root=self.prefix, recursive=True) + egl_header = find_headers(header_name, root=self.prefix) return gl_header + egl_header @property def egl_libs(self): lib_name = "libGL" - gl_lib = find_libraries(lib_name, root=self.prefix, recursive=True) + gl_lib = find_libraries(lib_name, root=self.prefix) lib_name = "libEGL" - egl_lib = find_libraries(lib_name, root=self.prefix, recursive=True) + egl_lib = find_libraries(lib_name, root=self.prefix) return gl_lib + egl_lib diff --git a/var/spack/repos/builtin/packages/elemental/package.py b/var/spack/repos/builtin/packages/elemental/package.py index 85dba11538a..62e760bb7a9 100644 --- a/var/spack/repos/builtin/packages/elemental/package.py +++ b/var/spack/repos/builtin/packages/elemental/package.py @@ -98,7 +98,7 @@ class Elemental(CMakePackage): @property def libs(self): shared = True if "+shared" in self.spec else False - return find_libraries("libEl", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libEl", root=self.prefix, shared=shared) def cmake_args(self): spec = self.spec @@ -123,7 +123,7 @@ def cmake_args(self): ifort = env["SPACK_F77"] intel_bin = os.path.dirname(ifort) intel_root = os.path.dirname(intel_bin) - libfortran = find_libraries("libifcoremt", root=intel_root, recursive=True) + libfortran = find_libraries("libifcoremt", root=intel_root) elif self.spec.satisfies("%gcc"): # see /debian/rules as an example: mpif77 = Executable(spec["mpi"].mpif77) @@ -134,7 +134,7 @@ def cmake_args(self): xl_fort = env["SPACK_F77"] xl_bin = os.path.dirname(xl_fort) xl_root = os.path.dirname(xl_bin) - libfortran = find_libraries("libxlf90_r", root=xl_root, recursive=True) + libfortran = find_libraries("libxlf90_r", root=xl_root) else: libfortran = None diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py index d097728c917..8af351a9834 100644 --- a/var/spack/repos/builtin/packages/elfutils/package.py +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -166,4 +166,4 @@ def install_elfh(self): # Provide location of libelf.so to match libelf. @property def libs(self): - return find_libraries("libelf", self.prefix, recursive=True) + return find_libraries("libelf", self.prefix) diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py index b1f07a460da..6ca7254324e 100644 --- a/var/spack/repos/builtin/packages/elpa/package.py +++ b/var/spack/repos/builtin/packages/elpa/package.py @@ -113,7 +113,7 @@ def url_for_version(self, version): @property def libs(self): libname = "libelpa_openmp" if "+openmp" in self.spec else "libelpa" - return find_libraries(libname, root=self.prefix, shared=True, recursive=True) + return find_libraries(libname, root=self.prefix, shared=True) @property def headers(self): diff --git a/var/spack/repos/builtin/packages/enzyme/package.py b/var/spack/repos/builtin/packages/enzyme/package.py index c793e1edddb..493ad183961 100644 --- a/var/spack/repos/builtin/packages/enzyme/package.py +++ b/var/spack/repos/builtin/packages/enzyme/package.py @@ -58,7 +58,7 @@ def libs(self): if self.version >= Version("0.0.32"): # TODO actual lower bound libs.append("LLDEnzyme-{0}".format(ver)) - return find_libraries(libs, root=self.prefix, recursive=True) + return find_libraries(libs, root=self.prefix) def setup_dependent_build_environment(self, env, dependent_spec): # Get the LLVMEnzyme and ClangEnzyme lib paths diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py index 86714923e6f..dbee519c3fc 100644 --- a/var/spack/repos/builtin/packages/extrae/package.py +++ b/var/spack/repos/builtin/packages/extrae/package.py @@ -142,7 +142,7 @@ def configure_args(self): ) if spec.satisfies("+cupti"): - cupti_h = find_headers("cupti", spec["cuda"].prefix, recursive=True) + cupti_h = find_headers("cupti", spec["cuda"].prefix) cupti_dir = os.path.dirname(os.path.dirname(cupti_h[0])) args += ["--with-cupti=%s" % cupti_dir] if "+cupti" in spec else ["--without-cupti"] diff --git a/var/spack/repos/builtin/packages/fdb/package.py b/var/spack/repos/builtin/packages/fdb/package.py index 74994b9ff10..e907c94e3db 100644 --- a/var/spack/repos/builtin/packages/fdb/package.py +++ b/var/spack/repos/builtin/packages/fdb/package.py @@ -71,7 +71,7 @@ class Fdb(CMakePackage): @property def libs(self): - return find_libraries("libfdb5", root=self.prefix, shared=True, recursive=True) + return find_libraries("libfdb5", root=self.prefix, shared=True) def cmake_args(self): enable_build_tools = "+tools" in self.spec diff --git a/var/spack/repos/builtin/packages/ffmpeg/package.py b/var/spack/repos/builtin/packages/ffmpeg/package.py index e2e55b1e709..757bed4752e 100644 --- a/var/spack/repos/builtin/packages/ffmpeg/package.py +++ b/var/spack/repos/builtin/packages/ffmpeg/package.py @@ -171,7 +171,7 @@ class Ffmpeg(AutotoolsPackage): @property def libs(self): - return find_libraries("*", self.prefix, recursive=True) + return find_libraries("*", self.prefix) @property def headers(self): diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index 44aace9f3ed..31d9fdcd3aa 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -62,7 +62,7 @@ def libs(self): libraries.append("libfftw3" + sfx) - return find_libraries(libraries, root=self.prefix, recursive=True) + return find_libraries(libraries, root=self.prefix) def flag_handler(self, name, flags): if name == "cflags": diff --git a/var/spack/repos/builtin/packages/freeglut/package.py b/var/spack/repos/builtin/packages/freeglut/package.py index 79e04f38859..b74b0c21a1e 100644 --- a/var/spack/repos/builtin/packages/freeglut/package.py +++ b/var/spack/repos/builtin/packages/freeglut/package.py @@ -75,4 +75,4 @@ def cmake_args(self): @property def libs(self): - return find_libraries(["libglut"], root=self.prefix, recursive=True) + return find_libraries(["libglut"], root=self.prefix) diff --git a/var/spack/repos/builtin/packages/freetype/package.py b/var/spack/repos/builtin/packages/freetype/package.py index 28784269512..6ce7f5fc5d3 100644 --- a/var/spack/repos/builtin/packages/freetype/package.py +++ b/var/spack/repos/builtin/packages/freetype/package.py @@ -81,7 +81,7 @@ def url_for_version(self, version): @property def headers(self): - headers = find_headers("*", self.prefix.include, recursive=True) + headers = find_headers("*", self.prefix.include) headers.directories = [self.prefix.include.freetype2] return headers diff --git a/var/spack/repos/builtin/packages/fujitsu-mpi/package.py b/var/spack/repos/builtin/packages/fujitsu-mpi/package.py index 36c6cec5848..494fc1b1f84 100644 --- a/var/spack/repos/builtin/packages/fujitsu-mpi/package.py +++ b/var/spack/repos/builtin/packages/fujitsu-mpi/package.py @@ -29,7 +29,7 @@ def install(self, spec, prefix): @property def headers(self): - hdrs = find_headers("mpi", self.prefix.include, recursive=True) + hdrs = find_headers("mpi", self.prefix.include) hdrs.directories = os.path.dirname(hdrs[0]) return hdrs or None @@ -41,7 +41,7 @@ def libs(self): if "cxx" in query_parameters: libraries = ["libmpi_cxx"] + libraries - return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=True) def setup_dependent_package(self, module, dependent_spec): if self.spec.satisfies("%gcc"): diff --git a/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py b/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py index a12b8ca0e9b..529a5ac94f1 100644 --- a/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py +++ b/var/spack/repos/builtin/packages/fujitsu-ssl2/package.py @@ -131,5 +131,5 @@ def setup_dependent_build_environment(self, env, dependent_spec): @property def headers(self): path = join_path(self.spec.prefix, "clang-comp") - headers = find_headers("cssl", path, recursive=True) + headers = find_headers("cssl", path) return headers diff --git a/var/spack/repos/builtin/packages/g2c/package.py b/var/spack/repos/builtin/packages/g2c/package.py index d4cb7c74a25..ca843f58627 100644 --- a/var/spack/repos/builtin/packages/g2c/package.py +++ b/var/spack/repos/builtin/packages/g2c/package.py @@ -89,7 +89,7 @@ def setup_run_environment(self, env): shared = False else: shared = self.spec.satisfies("libs=shared") - lib = find_libraries("libg2c", root=self.prefix, shared=shared, recursive=True) + lib = find_libraries("libg2c", root=self.prefix, shared=shared) env.set("G2C_LIB", lib[0]) env.set("G2C_INC", join_path(self.prefix, "include")) diff --git a/var/spack/repos/builtin/packages/gfsio/package.py b/var/spack/repos/builtin/packages/gfsio/package.py index e478a8b8ed5..b58874ca16c 100644 --- a/var/spack/repos/builtin/packages/gfsio/package.py +++ b/var/spack/repos/builtin/packages/gfsio/package.py @@ -33,7 +33,7 @@ def cmake_args(self): return args def setup_run_environment(self, env): - lib = find_libraries("libgfsio", root=self.prefix, shared=False, recursive=True) + lib = find_libraries("libgfsio", root=self.prefix, shared=False) # Only one library version, but still need to set _4 to make NCO happy for suffix in ("4", ""): env.set("GFSIO_LIB" + suffix, lib[0]) diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index efdcfa90c13..b1668992af6 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -205,7 +205,7 @@ def patch(self): @property def libs(self): - return find_libraries(["libglib*"], root=self.prefix, recursive=True) + return find_libraries(["libglib*"], root=self.prefix) class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta): diff --git a/var/spack/repos/builtin/packages/glx/package.py b/var/spack/repos/builtin/packages/glx/package.py index 56cbfca57f6..75a9d858d8c 100644 --- a/var/spack/repos/builtin/packages/glx/package.py +++ b/var/spack/repos/builtin/packages/glx/package.py @@ -30,7 +30,7 @@ def libs(self): @property def gl_headers(self): - return find_headers("GL/gl", root=self.gl_home, recursive=True) + return find_headers("GL/gl", root=self.gl_home) @property def gl_libs(self): diff --git a/var/spack/repos/builtin/packages/halide/package.py b/var/spack/repos/builtin/packages/halide/package.py index df6832bf914..1861b9a9734 100644 --- a/var/spack/repos/builtin/packages/halide/package.py +++ b/var/spack/repos/builtin/packages/halide/package.py @@ -95,7 +95,7 @@ class Halide(CMakePackage, PythonExtension): @property def libs(self): - return find_libraries("libHalide", root=self.prefix, recursive=True) + return find_libraries("libHalide", root=self.prefix) def cmake_args(self): # See https://github.com/halide/Halide/blob/main/README_cmake.md#building-halide-with-cmake diff --git a/var/spack/repos/builtin/packages/hdf/package.py b/var/spack/repos/builtin/packages/hdf/package.py index 85acc3dbb3e..e52863b6908 100644 --- a/var/spack/repos/builtin/packages/hdf/package.py +++ b/var/spack/repos/builtin/packages/hdf/package.py @@ -123,7 +123,7 @@ def libs(self): else: shared = self.spec.satisfies("+shared") - libs = find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + libs = find_libraries(libraries, root=self.prefix, shared=shared) if not libs: msg = "Unable to recursively locate {0} {1} libraries in {2}" diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 12e99d9bf61..1a10e5e5939 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -433,7 +433,7 @@ def libs(self): key = tuple(sorted(query_parameters)) libraries = query2libraries[key] - return find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=shared) @classmethod def determine_version(cls, exe): diff --git a/var/spack/repos/builtin/packages/hepmc3/package.py b/var/spack/repos/builtin/packages/hepmc3/package.py index 03da34d3f8c..566c745d642 100644 --- a/var/spack/repos/builtin/packages/hepmc3/package.py +++ b/var/spack/repos/builtin/packages/hepmc3/package.py @@ -60,7 +60,7 @@ class Hepmc3(CMakePackage): @property def libs(self): - return find_libraries(["libHepMC3", "libHepMC3Search"], root=self.prefix, recursive=True) + return find_libraries(["libHepMC3", "libHepMC3Search"], root=self.prefix) def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/hipsycl/package.py b/var/spack/repos/builtin/packages/hipsycl/package.py index 0a60f5f1892..44983a74abc 100644 --- a/var/spack/repos/builtin/packages/hipsycl/package.py +++ b/var/spack/repos/builtin/packages/hipsycl/package.py @@ -168,7 +168,7 @@ def adjust_core_config(config): rpaths = set() if self.spec.satisfies("~rocm"): so_paths = filesystem.find_libraries( - "libc++", self.spec["llvm"].prefix, shared=True, recursive=True + "libc++", self.spec["llvm"].prefix, shared=True ) if len(so_paths) != 1: raise InstallError( @@ -178,7 +178,7 @@ def adjust_core_config(config): ) rpaths.add(path.dirname(so_paths[0])) so_paths = filesystem.find_libraries( - "libc++abi", self.spec["llvm"].prefix, shared=True, recursive=True + "libc++abi", self.spec["llvm"].prefix, shared=True ) if len(so_paths) != 1: raise InstallError( diff --git a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py index 579a7b01ba3..682ea583f26 100644 --- a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py +++ b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py @@ -121,9 +121,7 @@ def cmake_args(self): # hsa-rocr-dev wants the directory containing the header files, but # libelf adds an extra path (include/libelf) compared to elfutils - libelf_include = os.path.dirname( - find_headers("libelf", spec["elf"].prefix.include, recursive=True)[0] - ) + libelf_include = os.path.dirname(find_headers("libelf", spec["elf"].prefix.include)[0]) args = [ self.define("LIBELF_INCLUDE_DIRS", libelf_include), diff --git a/var/spack/repos/builtin/packages/htslib/package.py b/var/spack/repos/builtin/packages/htslib/package.py index 9e43771b2f6..0d8bc065e08 100644 --- a/var/spack/repos/builtin/packages/htslib/package.py +++ b/var/spack/repos/builtin/packages/htslib/package.py @@ -73,7 +73,7 @@ class Htslib(AutotoolsPackage): @property def libs(self): - return find_libraries("libhts", root=self.prefix, recursive=True) + return find_libraries("libhts", root=self.prefix) # v1.2 uses the automagically assembled tarball from .../archive/... # everything else uses the tarballs uploaded to the release diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index 4ef81adee39..aff6bc7992e 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -156,7 +156,7 @@ def url_for_version(self, version): @property def libs(self): - libs = find_libraries("libhwloc", root=self.prefix, shared=True, recursive=True) + libs = find_libraries("libhwloc", root=self.prefix, shared=True) return LibraryList(libs) def configure_args(self): diff --git a/var/spack/repos/builtin/packages/hydrogen/package.py b/var/spack/repos/builtin/packages/hydrogen/package.py index b4116df1c4f..f49b7caff60 100644 --- a/var/spack/repos/builtin/packages/hydrogen/package.py +++ b/var/spack/repos/builtin/packages/hydrogen/package.py @@ -140,7 +140,7 @@ class Hydrogen(CachedCMakePackage, CudaPackage, ROCmPackage): @property def libs(self): shared = True if self.spec.satisfies("+shared") else False - return find_libraries("libHydrogen", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libHydrogen", root=self.prefix, shared=shared) def cmake_args(self): args = [] diff --git a/var/spack/repos/builtin/packages/hypre-cmake/package.py b/var/spack/repos/builtin/packages/hypre-cmake/package.py index df5be36f64b..bbb8aac014e 100644 --- a/var/spack/repos/builtin/packages/hypre-cmake/package.py +++ b/var/spack/repos/builtin/packages/hypre-cmake/package.py @@ -153,5 +153,5 @@ def libs(self): Sample usage: spec['hypre'].libs.ld_flags """ is_shared = self.spec.satisfies("+shared") - libs = find_libraries("libHYPRE", root=self.prefix, shared=is_shared, recursive=True) + libs = find_libraries("libHYPRE", root=self.prefix, shared=is_shared) return libs or None diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 8d3c262c672..1bf2a0c34a0 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -428,5 +428,5 @@ def libs(self): Sample usage: spec['hypre'].libs.ld_flags """ is_shared = self.spec.satisfies("+shared") - libs = find_libraries("libHYPRE", root=self.prefix, shared=is_shared, recursive=True) + libs = find_libraries("libHYPRE", root=self.prefix, shared=is_shared) return libs or None diff --git a/var/spack/repos/builtin/packages/ibm-java/package.py b/var/spack/repos/builtin/packages/ibm-java/package.py index 376233effde..45ab9001408 100644 --- a/var/spack/repos/builtin/packages/ibm-java/package.py +++ b/var/spack/repos/builtin/packages/ibm-java/package.py @@ -82,7 +82,7 @@ def url_for_version(self, version): @property def libs(self): - return find_libraries(["libjvm"], root=self.home, recursive=True) + return find_libraries(["libjvm"], root=self.home) def setup_run_environment(self, env): env.set("JAVA_HOME", self.home) diff --git a/var/spack/repos/builtin/packages/imagemagick/package.py b/var/spack/repos/builtin/packages/imagemagick/package.py index cae37bc79ba..ecb4bf61fb4 100644 --- a/var/spack/repos/builtin/packages/imagemagick/package.py +++ b/var/spack/repos/builtin/packages/imagemagick/package.py @@ -82,4 +82,4 @@ def configure_args(self): @property def libs(self): - return find_libraries("libMagick*", root=self.prefix, recursive=True) + return find_libraries("libMagick*", root=self.prefix) diff --git a/var/spack/repos/builtin/packages/intel-gtpin/package.py b/var/spack/repos/builtin/packages/intel-gtpin/package.py index d082e4fb178..d51494bfbb5 100644 --- a/var/spack/repos/builtin/packages/intel-gtpin/package.py +++ b/var/spack/repos/builtin/packages/intel-gtpin/package.py @@ -112,7 +112,7 @@ def headers(self): @property def libs(self): - return find_libraries("libgtpin", self.prefix.Lib, recursive=True) + return find_libraries("libgtpin", self.prefix.Lib) # The gtpin binary uses libraries from its own Lib directory but # doesn't set rpath. diff --git a/var/spack/repos/builtin/packages/intel-tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py index 4598ce16435..bd048ccac38 100644 --- a/var/spack/repos/builtin/packages/intel-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-tbb/package.py @@ -188,7 +188,7 @@ def url_for_version(self, version): @property def libs(self): shared = True if self.spec.satisfies("+shared") else False - return find_libraries("libtbb*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libtbb*", root=self.prefix, shared=shared) class SetupEnvironment: diff --git a/var/spack/repos/builtin/packages/ip/package.py b/var/spack/repos/builtin/packages/ip/package.py index 5a55f37b81f..307d92fc034 100644 --- a/var/spack/repos/builtin/packages/ip/package.py +++ b/var/spack/repos/builtin/packages/ip/package.py @@ -113,9 +113,7 @@ def setup_run_environment(self, env): ) shared = False if self.spec.satisfies("@:4.0") else self.spec.satisfies("+shared") for suffix in suffixes: - lib = find_libraries( - "libip_" + suffix, root=self.prefix, shared=shared, recursive=True - ) + lib = find_libraries("libip_" + suffix, root=self.prefix, shared=shared) env.set("IP_LIB" + suffix, lib[0]) env.set("IP_INC" + suffix, join_path(self.prefix, "include_" + suffix)) diff --git a/var/spack/repos/builtin/packages/ip2/package.py b/var/spack/repos/builtin/packages/ip2/package.py index ed228022d4b..d6f849aec59 100644 --- a/var/spack/repos/builtin/packages/ip2/package.py +++ b/var/spack/repos/builtin/packages/ip2/package.py @@ -33,8 +33,6 @@ class Ip2(CMakePackage): def setup_run_environment(self, env): for suffix in ("4", "8", "d"): - lib = find_libraries( - "libip2_" + suffix, root=self.prefix, shared=False, recursive=True - ) + lib = find_libraries("libip2_" + suffix, root=self.prefix, shared=False) env.set("IP2_LIB" + suffix, lib[0]) env.set("IP2_INC" + suffix, join_path(self.prefix, "include_" + suffix)) diff --git a/var/spack/repos/builtin/packages/jbigkit/package.py b/var/spack/repos/builtin/packages/jbigkit/package.py index 9551d7b046e..e9eacea8e06 100644 --- a/var/spack/repos/builtin/packages/jbigkit/package.py +++ b/var/spack/repos/builtin/packages/jbigkit/package.py @@ -38,4 +38,4 @@ def install(self, spec, prefix): @property def libs(self): - return find_libraries("libjbig*", root=self.prefix, shared=False, recursive=True) + return find_libraries("libjbig*", root=self.prefix, shared=False) diff --git a/var/spack/repos/builtin/packages/jdk/package.py b/var/spack/repos/builtin/packages/jdk/package.py index c699f19a102..c423f38566e 100644 --- a/var/spack/repos/builtin/packages/jdk/package.py +++ b/var/spack/repos/builtin/packages/jdk/package.py @@ -93,7 +93,7 @@ def libs(self): Search recursively to find the correct library location.""" - return find_libraries(["libjvm"], root=self.home, recursive=True) + return find_libraries(["libjvm"], root=self.home) def install(self, spec, prefix): install_tree(".", prefix) diff --git a/var/spack/repos/builtin/packages/kealib/package.py b/var/spack/repos/builtin/packages/kealib/package.py index 2939c85d73b..7447de84623 100644 --- a/var/spack/repos/builtin/packages/kealib/package.py +++ b/var/spack/repos/builtin/packages/kealib/package.py @@ -79,4 +79,4 @@ def cmake_args(self): @property def libs(self): - return find_libraries("libkea", self.prefix, shared=True, recursive=True) + return find_libraries("libkea", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/kentutils/package.py b/var/spack/repos/builtin/packages/kentutils/package.py index d2838c9da62..083a279e6f8 100644 --- a/var/spack/repos/builtin/packages/kentutils/package.py +++ b/var/spack/repos/builtin/packages/kentutils/package.py @@ -87,9 +87,9 @@ def machtype(self): @property def headers(self): headers = [] - headers.extend(find_headers("*", self.prefix.inc, recursive=True)) + headers.extend(find_headers("*", self.prefix.inc)) if self.spec.satisfies("+builtin_htslib"): - headers.extend(find_headers("*", self.prefix.htslib, recursive=True)) + headers.extend(find_headers("*", self.prefix.htslib)) return HeaderList(headers) @property diff --git a/var/spack/repos/builtin/packages/landsfcutil/package.py b/var/spack/repos/builtin/packages/landsfcutil/package.py index 9027d4eeda7..b811b555403 100644 --- a/var/spack/repos/builtin/packages/landsfcutil/package.py +++ b/var/spack/repos/builtin/packages/landsfcutil/package.py @@ -34,9 +34,7 @@ def cmake_args(self): def setup_run_environment(self, env): for suffix in ("4", "d"): - lib = find_libraries( - "liblandsfcutil_" + suffix, root=self.prefix, shared=False, recursive=True - ) + lib = find_libraries("liblandsfcutil_" + suffix, root=self.prefix, shared=False) env.set("LANDSFCUTIL_LIB" + suffix, lib[0]) env.set("LANDSFCUTIL_INC" + suffix, join_path(self.prefix, "include_" + suffix)) diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index 0686530d21c..987bcf5da87 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -267,7 +267,7 @@ def _get_sys_type(self, spec): @property def libs(self): shared = True if self.spec.satisfies("+shared") else False - return find_libraries("liblbann", root=self.prefix, shared=shared, recursive=True) + return find_libraries("liblbann", root=self.prefix, shared=shared) @property def cache_name(self): diff --git a/var/spack/repos/builtin/packages/lcms/package.py b/var/spack/repos/builtin/packages/lcms/package.py index ce452131b2f..89030d2b006 100644 --- a/var/spack/repos/builtin/packages/lcms/package.py +++ b/var/spack/repos/builtin/packages/lcms/package.py @@ -41,7 +41,7 @@ def url_for_version(self, version): @property def libs(self): - return find_libraries("liblcms2", root=self.prefix, recursive=True) + return find_libraries("liblcms2", root=self.prefix) class MSBuildBuilder(spack.build_systems.msbuild.MSBuildBuilder): diff --git a/var/spack/repos/builtin/packages/lerc/package.py b/var/spack/repos/builtin/packages/lerc/package.py index 3ce249af434..4c712d78b4e 100644 --- a/var/spack/repos/builtin/packages/lerc/package.py +++ b/var/spack/repos/builtin/packages/lerc/package.py @@ -29,4 +29,4 @@ class Lerc(CMakePackage): @property def libs(self): - return find_libraries(["libLerc"], root=self.prefix, recursive=True) + return find_libraries(["libLerc"], root=self.prefix) diff --git a/var/spack/repos/builtin/packages/libaec/package.py b/var/spack/repos/builtin/packages/libaec/package.py index f0498b3fd0d..4a2a5aab190 100644 --- a/var/spack/repos/builtin/packages/libaec/package.py +++ b/var/spack/repos/builtin/packages/libaec/package.py @@ -44,7 +44,7 @@ def libs(self): shared = "~shared" not in self.spec - libs = find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + libs = find_libraries(libraries, root=self.prefix, shared=shared) if not libs: msg = "Unable to recursively locate {0} {1} libraries in {2}" diff --git a/var/spack/repos/builtin/packages/libcumlprims/package.py b/var/spack/repos/builtin/packages/libcumlprims/package.py index a7ae12acb2e..fbd0f00271b 100644 --- a/var/spack/repos/builtin/packages/libcumlprims/package.py +++ b/var/spack/repos/builtin/packages/libcumlprims/package.py @@ -33,7 +33,7 @@ class Libcumlprims(Package): @property def headers(self): - headers = find_headers("*", self.prefix.include, recursive=True) + headers = find_headers("*", self.prefix.include) headers.directories = [self.prefix.include, self.prefix.include.cumlprims] return headers diff --git a/var/spack/repos/builtin/packages/libevent/package.py b/var/spack/repos/builtin/packages/libevent/package.py index 2fff5bc04f1..38f6dab413d 100644 --- a/var/spack/repos/builtin/packages/libevent/package.py +++ b/var/spack/repos/builtin/packages/libevent/package.py @@ -55,7 +55,7 @@ def url_for_version(self, version): @property def libs(self): - libs = find_libraries("libevent", root=self.prefix, shared=True, recursive=True) + libs = find_libraries("libevent", root=self.prefix, shared=True) return LibraryList(libs) def configure_args(self): diff --git a/var/spack/repos/builtin/packages/libffi/package.py b/var/spack/repos/builtin/packages/libffi/package.py index c2b8b12a6e8..e8e13f82ddd 100644 --- a/var/spack/repos/builtin/packages/libffi/package.py +++ b/var/spack/repos/builtin/packages/libffi/package.py @@ -48,7 +48,7 @@ class Libffi(AutotoolsPackage): @property def headers(self): # The headers are probably in self.prefix.lib but we search everywhere - return find_headers("ffi", self.prefix, recursive=True) + return find_headers("ffi", self.prefix) def flag_handler(self, name, flags): if name == "cflags": diff --git a/var/spack/repos/builtin/packages/libfms/package.py b/var/spack/repos/builtin/packages/libfms/package.py index c32b15b764c..950a4c5e00d 100644 --- a/var/spack/repos/builtin/packages/libfms/package.py +++ b/var/spack/repos/builtin/packages/libfms/package.py @@ -53,5 +53,5 @@ def libs(self): Sample usage: spec['libfms'].libs.ld_flags """ is_shared = self.spec.satisfies("+shared") - libs = find_libraries("libfms", root=self.prefix, shared=is_shared, recursive=True) + libs = find_libraries("libfms", root=self.prefix, shared=is_shared) return libs or None # Raise an error if no libs are found diff --git a/var/spack/repos/builtin/packages/libgain/package.py b/var/spack/repos/builtin/packages/libgain/package.py index 3df08f4a24d..e60e3c0e58b 100644 --- a/var/spack/repos/builtin/packages/libgain/package.py +++ b/var/spack/repos/builtin/packages/libgain/package.py @@ -31,4 +31,4 @@ def flag_handler(self, name, flags): @property def libs(self): shared = self.spec.satisfies("+shared") - return find_libraries("libGaIn", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libGaIn", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/libice/package.py b/var/spack/repos/builtin/packages/libice/package.py index e8807b88817..12a1b35c9dd 100644 --- a/var/spack/repos/builtin/packages/libice/package.py +++ b/var/spack/repos/builtin/packages/libice/package.py @@ -34,4 +34,4 @@ class Libice(AutotoolsPackage, XorgPackage): @property def libs(self): - return find_libraries("libICE", self.prefix, shared=True, recursive=True) + return find_libraries("libICE", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/libiconv/package.py b/var/spack/repos/builtin/packages/libiconv/package.py index 26db964f1c8..6dc33f44d95 100644 --- a/var/spack/repos/builtin/packages/libiconv/package.py +++ b/var/spack/repos/builtin/packages/libiconv/package.py @@ -61,4 +61,4 @@ def configure_args(self): @property def libs(self): shared = self.spec.satisfies("libs=shared") - return find_libraries(["libiconv"], root=self.prefix, recursive=True, shared=shared) + return find_libraries(["libiconv"], root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py index cc09df56457..6b7136c096c 100644 --- a/var/spack/repos/builtin/packages/libint/package.py +++ b/var/spack/repos/builtin/packages/libint/package.py @@ -285,4 +285,4 @@ def patch(self): @property def libs(self): - return find_libraries("libint2", self.spec.prefix, shared=True, recursive=True) + return find_libraries("libint2", self.spec.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py index 65b07ad458d..67df226cdb0 100644 --- a/var/spack/repos/builtin/packages/libjpeg-turbo/package.py +++ b/var/spack/repos/builtin/packages/libjpeg-turbo/package.py @@ -114,7 +114,7 @@ class LibjpegTurbo(CMakePackage, AutotoolsPackage): def libs(self): shared = self.spec.satisfies("libs=shared") name = "jpeg" if sys.platform == "win32" else "libjpeg*" - return find_libraries(name, root=self.prefix, shared=shared, recursive=True, runtime=False) + return find_libraries(name, root=self.prefix, shared=shared, runtime=False) class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): diff --git a/var/spack/repos/builtin/packages/libkml/package.py b/var/spack/repos/builtin/packages/libkml/package.py index 2c0fde6cfcb..8ac58324593 100644 --- a/var/spack/repos/builtin/packages/libkml/package.py +++ b/var/spack/repos/builtin/packages/libkml/package.py @@ -45,7 +45,7 @@ class Libkml(CMakePackage): @property def libs(self): - return find_libraries("libkmlbase", root=self.prefix, recursive=True) + return find_libraries("libkmlbase", root=self.prefix) def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py index 7f3a85c2aeb..8f0d01430b9 100644 --- a/var/spack/repos/builtin/packages/libpng/package.py +++ b/var/spack/repos/builtin/packages/libpng/package.py @@ -49,9 +49,7 @@ def libs(self): # v1.2 does not have a version-less symlink libraries = f"libpng{self.version.up_to(2).joined}" shared = self.spec.satisfies("libs=shared") - return find_libraries( - libraries, root=self.prefix, shared=shared, recursive=True, runtime=False - ) + return find_libraries(libraries, root=self.prefix, shared=shared, runtime=False) class CMakeBuilder(CMakeBuilder): diff --git a/var/spack/repos/builtin/packages/libsm/package.py b/var/spack/repos/builtin/packages/libsm/package.py index 103b16aa0a7..f1487451299 100644 --- a/var/spack/repos/builtin/packages/libsm/package.py +++ b/var/spack/repos/builtin/packages/libsm/package.py @@ -33,4 +33,4 @@ class Libsm(AutotoolsPackage, XorgPackage): @property def libs(self): - return find_libraries("libSM", self.prefix, shared=True, recursive=True) + return find_libraries("libSM", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/libspatialindex/package.py b/var/spack/repos/builtin/packages/libspatialindex/package.py index 3504012bfe9..4a600905f06 100644 --- a/var/spack/repos/builtin/packages/libspatialindex/package.py +++ b/var/spack/repos/builtin/packages/libspatialindex/package.py @@ -23,4 +23,4 @@ class Libspatialindex(CMakePackage): @property def libs(self): - return find_libraries(["libspatialindex_c"], root=self.prefix, recursive=True, shared=True) + return find_libraries(["libspatialindex_c"], root=self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/libszip/package.py b/var/spack/repos/builtin/packages/libszip/package.py index 107c821272a..6aa64708896 100644 --- a/var/spack/repos/builtin/packages/libszip/package.py +++ b/var/spack/repos/builtin/packages/libszip/package.py @@ -30,7 +30,7 @@ class Libszip(AutotoolsPackage): def libs(self): shared = "static" not in self.spec.last_query.extra_parameters - libs = find_libraries("libsz", root=self.prefix, shared=shared, recursive=True) + libs = find_libraries("libsz", root=self.prefix, shared=shared) if not libs: msg = "Unable to recursively locate {0} {1} libraries in {2}" diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index 1547aa6764d..e0424955f1e 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -79,7 +79,7 @@ def autoreconf(self, spec, prefix): @property def libs(self): - return find_libraries(["libltdl"], root=self.prefix, recursive=True, shared=True) + return find_libraries(["libltdl"], root=self.prefix, shared=True) def _make_executable(self, name): return Executable(join_path(self.prefix.bin, name)) diff --git a/var/spack/repos/builtin/packages/libuv-julia/package.py b/var/spack/repos/builtin/packages/libuv-julia/package.py index 00a62915871..ce590150172 100644 --- a/var/spack/repos/builtin/packages/libuv-julia/package.py +++ b/var/spack/repos/builtin/packages/libuv-julia/package.py @@ -39,7 +39,7 @@ def autoreconf(self, spec, prefix): @property def libs(self): - return find_libraries(["libuv"], root=self.prefix, recursive=True, shared=False) + return find_libraries(["libuv"], root=self.prefix, shared=False) def configure_args(self): # Only build static libaries for now diff --git a/var/spack/repos/builtin/packages/libxau/package.py b/var/spack/repos/builtin/packages/libxau/package.py index 1d3ecde7c62..388b7487e9c 100644 --- a/var/spack/repos/builtin/packages/libxau/package.py +++ b/var/spack/repos/builtin/packages/libxau/package.py @@ -31,4 +31,4 @@ class Libxau(AutotoolsPackage, XorgPackage): @property def libs(self): - return find_libraries("libXau", self.prefix, shared=True, recursive=True) + return find_libraries("libXau", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/libxc/package.py b/var/spack/repos/builtin/packages/libxc/package.py index 46ff91c34f1..633ee9ffb9a 100644 --- a/var/spack/repos/builtin/packages/libxc/package.py +++ b/var/spack/repos/builtin/packages/libxc/package.py @@ -86,7 +86,7 @@ def libs(self): else: # starting from version 4 there is also a stable f03 iface libraries = ["libxcf90", "libxcf03"] + libraries - return find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=shared) def setup_build_environment(self, env): # microarchitecture-specific optimization flags should be controlled diff --git a/var/spack/repos/builtin/packages/libxcrypt/package.py b/var/spack/repos/builtin/packages/libxcrypt/package.py index dccd34f7b98..99464db4832 100644 --- a/var/spack/repos/builtin/packages/libxcrypt/package.py +++ b/var/spack/repos/builtin/packages/libxcrypt/package.py @@ -70,4 +70,4 @@ def configure_args(self): @property def libs(self): - return find_libraries("libcrypt", root=self.prefix, recursive=True) + return find_libraries("libcrypt", root=self.prefix) diff --git a/var/spack/repos/builtin/packages/libxext/package.py b/var/spack/repos/builtin/packages/libxext/package.py index c107e9305bf..203fe39420d 100644 --- a/var/spack/repos/builtin/packages/libxext/package.py +++ b/var/spack/repos/builtin/packages/libxext/package.py @@ -32,4 +32,4 @@ class Libxext(AutotoolsPackage, XorgPackage): @property def libs(self): - return find_libraries("libXext", self.prefix, shared=True, recursive=True) + return find_libraries("libXext", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/libxi/package.py b/var/spack/repos/builtin/packages/libxi/package.py index 3f7cf05dc82..4b86a6a64b8 100644 --- a/var/spack/repos/builtin/packages/libxi/package.py +++ b/var/spack/repos/builtin/packages/libxi/package.py @@ -39,4 +39,4 @@ class Libxi(AutotoolsPackage, XorgPackage): @property def libs(self): - return find_libraries("libXi", self.prefix, shared=True, recursive=True) + return find_libraries("libXi", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/libxinerama/package.py b/var/spack/repos/builtin/packages/libxinerama/package.py index 3156091c5a0..e15734530fc 100644 --- a/var/spack/repos/builtin/packages/libxinerama/package.py +++ b/var/spack/repos/builtin/packages/libxinerama/package.py @@ -32,4 +32,4 @@ class Libxinerama(AutotoolsPackage, XorgPackage): @property def libs(self): - return find_libraries("libXinerama", self.prefix, shared=True, recursive=True) + return find_libraries("libXinerama", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/libxrandr/package.py b/var/spack/repos/builtin/packages/libxrandr/package.py index 01e28d012d2..1652e0d4d65 100644 --- a/var/spack/repos/builtin/packages/libxrandr/package.py +++ b/var/spack/repos/builtin/packages/libxrandr/package.py @@ -34,4 +34,4 @@ class Libxrandr(AutotoolsPackage, XorgPackage): @property def libs(self): - return find_libraries("libXrandr", self.prefix, shared=True, recursive=True) + return find_libraries("libXrandr", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/libxrender/package.py b/var/spack/repos/builtin/packages/libxrender/package.py index a01b8e86775..82d20bbc86f 100644 --- a/var/spack/repos/builtin/packages/libxrender/package.py +++ b/var/spack/repos/builtin/packages/libxrender/package.py @@ -30,4 +30,4 @@ class Libxrender(AutotoolsPackage, XorgPackage): @property def libs(self): - return find_libraries("libXrender", self.prefix, shared=True, recursive=True) + return find_libraries("libXrender", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/libxsmm/package.py b/var/spack/repos/builtin/packages/libxsmm/package.py index 14e287a9185..888d9126778 100644 --- a/var/spack/repos/builtin/packages/libxsmm/package.py +++ b/var/spack/repos/builtin/packages/libxsmm/package.py @@ -103,11 +103,9 @@ class Libxsmm(MakefilePackage): @property def libs(self): - result = find_libraries(["libxsmm", "libxsmmf"], root=self.prefix, recursive=True) + result = find_libraries(["libxsmm", "libxsmmf"], root=self.prefix) if len(result) == 0: - result = find_libraries( - ["libxsmm", "libxsmmf"], root=self.prefix, shared=False, recursive=True - ) + result = find_libraries(["libxsmm", "libxsmmf"], root=self.prefix, shared=False) return result def build(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/libxt/package.py b/var/spack/repos/builtin/packages/libxt/package.py index 96693ebecd7..67804967671 100644 --- a/var/spack/repos/builtin/packages/libxt/package.py +++ b/var/spack/repos/builtin/packages/libxt/package.py @@ -34,4 +34,4 @@ class Libxt(AutotoolsPackage, XorgPackage): @property def libs(self): - return find_libraries("libXt", root=self.prefix, shared=True, recursive=True) + return find_libraries("libXt", root=self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/libxxf86vm/package.py b/var/spack/repos/builtin/packages/libxxf86vm/package.py index eef44998cda..07b1b75d9d4 100644 --- a/var/spack/repos/builtin/packages/libxxf86vm/package.py +++ b/var/spack/repos/builtin/packages/libxxf86vm/package.py @@ -32,4 +32,4 @@ class Libxxf86vm(AutotoolsPackage, XorgPackage): @property def libs(self): - return find_libraries("libXxf86vm", self.prefix, shared=True, recursive=True) + return find_libraries("libXxf86vm", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/likwid/package.py b/var/spack/repos/builtin/packages/likwid/package.py index c6a7242ce91..3b690c79ff9 100644 --- a/var/spack/repos/builtin/packages/likwid/package.py +++ b/var/spack/repos/builtin/packages/likwid/package.py @@ -109,9 +109,7 @@ def patch(self): def setup_run_environment(self, env): if self.spec.satisfies("+cuda"): - libs = find_libraries( - "libcupti", root=self.spec["cuda"].prefix, shared=True, recursive=True - ) + libs = find_libraries("libcupti", root=self.spec["cuda"].prefix, shared=True) for lib in libs.directories: env.append_path("LD_LIBRARY_PATH", lib) if self.spec.satisfies("+rocm"): diff --git a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py index 4e0385dd944..f00d37c5082 100644 --- a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py +++ b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py @@ -83,4 +83,4 @@ def cmake_args(self): @property def libs(self): - return find_libraries("libomp", root=self.prefix, recursive=True) + return find_libraries("libomp", root=self.prefix) diff --git a/var/spack/repos/builtin/packages/llvm-openmp/package.py b/var/spack/repos/builtin/packages/llvm-openmp/package.py index a1e3f056c98..cf9076f7407 100644 --- a/var/spack/repos/builtin/packages/llvm-openmp/package.py +++ b/var/spack/repos/builtin/packages/llvm-openmp/package.py @@ -84,4 +84,4 @@ def cmake_args(self): @property def libs(self): - return find_libraries("libomp", root=self.prefix, recursive=True) + return find_libraries("libomp", root=self.prefix) diff --git a/var/spack/repos/builtin/packages/lm-sensors/package.py b/var/spack/repos/builtin/packages/lm-sensors/package.py index a9ae344fff4..81809218add 100644 --- a/var/spack/repos/builtin/packages/lm-sensors/package.py +++ b/var/spack/repos/builtin/packages/lm-sensors/package.py @@ -48,4 +48,4 @@ def install(self, spec, prefix): @property def libs(self): - return find_libraries("libsensors", root=self.prefix, shared=True, recursive=True) + return find_libraries("libsensors", root=self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/lorene/package.py b/var/spack/repos/builtin/packages/lorene/package.py index abf63bd21fb..141fecea5e7 100644 --- a/var/spack/repos/builtin/packages/lorene/package.py +++ b/var/spack/repos/builtin/packages/lorene/package.py @@ -126,4 +126,4 @@ def install(self, spec, prefix): @property def libs(self): shared = self.spec.satisfies("+shared") - return find_libraries("liblorene*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("liblorene*", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py b/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py index 1f8356270f2..18b612298ae 100644 --- a/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py +++ b/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py @@ -45,7 +45,7 @@ def install_links(self): @property def headers(self): - hdrs = find_headers("luajit", self.prefix.include, recursive=True) + hdrs = find_headers("luajit", self.prefix.include) hdrs.directories = os.path.dirname(hdrs[0]) return hdrs or None diff --git a/var/spack/repos/builtin/packages/lua-luajit/package.py b/var/spack/repos/builtin/packages/lua-luajit/package.py index f46748202df..8a16ee8acb0 100644 --- a/var/spack/repos/builtin/packages/lua-luajit/package.py +++ b/var/spack/repos/builtin/packages/lua-luajit/package.py @@ -48,7 +48,7 @@ def install_links(self): @property def headers(self): - hdrs = find_headers("luajit", self.prefix.include, recursive=True) + hdrs = find_headers("luajit", self.prefix.include) hdrs.directories = os.path.dirname(hdrs[0]) return hdrs or None diff --git a/var/spack/repos/builtin/packages/magics/package.py b/var/spack/repos/builtin/packages/magics/package.py index e895e44702e..9689ae99689 100644 --- a/var/spack/repos/builtin/packages/magics/package.py +++ b/var/spack/repos/builtin/packages/magics/package.py @@ -159,7 +159,7 @@ def cmake_args(self): @property def libs(self): - return find_libraries(["libMagPlus"], root=self.prefix, recursive=True) + return find_libraries(["libMagPlus"], root=self.prefix) @property def headers(self): diff --git a/var/spack/repos/builtin/packages/mariadb-c-client/package.py b/var/spack/repos/builtin/packages/mariadb-c-client/package.py index 15ca777da0f..6fae33f3163 100644 --- a/var/spack/repos/builtin/packages/mariadb-c-client/package.py +++ b/var/spack/repos/builtin/packages/mariadb-c-client/package.py @@ -90,4 +90,4 @@ def cmake_args(self): @property def libs(self): - return find_libraries(["libmariadb"], root=self.prefix, recursive=True, shared=True) + return find_libraries(["libmariadb"], root=self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/matrix-switch/package.py b/var/spack/repos/builtin/packages/matrix-switch/package.py index e29afca4904..cfde62d4f2e 100644 --- a/var/spack/repos/builtin/packages/matrix-switch/package.py +++ b/var/spack/repos/builtin/packages/matrix-switch/package.py @@ -52,4 +52,4 @@ def cmake_args(self): @property def libs(self): - return find_libraries("libmatrixswitch", root=self.home, recursive=True, shared=False) + return find_libraries("libmatrixswitch", root=self.home, shared=False) diff --git a/var/spack/repos/builtin/packages/mesa-glu/package.py b/var/spack/repos/builtin/packages/mesa-glu/package.py index 4692ad4e6b7..68418eef3ce 100644 --- a/var/spack/repos/builtin/packages/mesa-glu/package.py +++ b/var/spack/repos/builtin/packages/mesa-glu/package.py @@ -37,4 +37,4 @@ def configure_args(self): @property def libs(self): - return find_libraries("libGLU", self.prefix, recursive=True) + return find_libraries("libGLU", self.prefix) diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py index 61494f3db6a..d35a9ec0a06 100644 --- a/var/spack/repos/builtin/packages/mesa/package.py +++ b/var/spack/repos/builtin/packages/mesa/package.py @@ -173,7 +173,7 @@ def libglx_headers(self): @property def libglx_libs(self): - return find_libraries("libGL", root=self.spec.prefix, recursive=True) + return find_libraries("libGL", root=self.spec.prefix) @property def libosmesa_headers(self): @@ -185,7 +185,7 @@ def libosmesa_libs(self): lib_name = "osmesa" else: lib_name = "libOSMesa" - return find_libraries(lib_name, root=self.spec.prefix, recursive=True) + return find_libraries(lib_name, root=self.spec.prefix) class MesonBuilder(spack.build_systems.meson.MesonBuilder): diff --git a/var/spack/repos/builtin/packages/met/package.py b/var/spack/repos/builtin/packages/met/package.py index c75ebe8cf1a..9a5dae49906 100644 --- a/var/spack/repos/builtin/packages/met/package.py +++ b/var/spack/repos/builtin/packages/met/package.py @@ -117,7 +117,7 @@ def setup_build_environment(self, env): bufr = spec["bufr"] shared_bufr = True if "+shared" in bufr else False bufr_libdir = find_libraries( - "libbufr_4", root=bufr.prefix, shared=shared_bufr, recursive=True + "libbufr_4", root=bufr.prefix, shared=shared_bufr ).directories[0] env.set("BUFRLIB_NAME", "-lbufr_4") env.set("MET_BUFRLIB", bufr_libdir) diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py index b50af840f27..49e7d1288dd 100644 --- a/var/spack/repos/builtin/packages/mfem/package.py +++ b/var/spack/repos/builtin/packages/mfem/package.py @@ -794,9 +794,7 @@ def find_optional_library(name, prefix): if "+zfp" in strumpack: zfp = strumpack["zfp"] sp_opt += ["-I%s" % zfp.prefix.include] - zfp_lib = find_libraries( - "libzfp", zfp.prefix, shared=("+shared" in zfp), recursive=True - ) + zfp_lib = find_libraries("libzfp", zfp.prefix, shared=("+shared" in zfp)) sp_lib += [ld_flags_from_library_list(zfp_lib)] if "+cuda" in strumpack: # assuming also ("+cuda" in spec) @@ -1016,9 +1014,7 @@ def find_optional_library(name, prefix): if "+raja" in spec: raja = spec["raja"] raja_opt = "-I%s" % raja.prefix.include - raja_lib = find_libraries( - "libRAJA", raja.prefix, shared=("+shared" in raja), recursive=True - ) + raja_lib = find_libraries("libRAJA", raja.prefix, shared=("+shared" in raja)) if raja.satisfies("^camp"): camp = raja["camp"] raja_opt += " -I%s" % camp.prefix.include @@ -1133,9 +1129,7 @@ def find_optional_library(name, prefix): if "^raja" in hiop: raja = hiop["raja"] hiop_hdrs += raja.headers - hiop_libs += find_libraries( - "libRAJA", raja.prefix, shared=("+shared" in raja), recursive=True - ) + hiop_libs += find_libraries("libRAJA", raja.prefix, shared=("+shared" in raja)) if raja.satisfies("^camp"): camp = raja["camp"] hiop_hdrs += camp.headers diff --git a/var/spack/repos/builtin/packages/mozjpeg/package.py b/var/spack/repos/builtin/packages/mozjpeg/package.py index aa802f5e504..4c43c05003b 100644 --- a/var/spack/repos/builtin/packages/mozjpeg/package.py +++ b/var/spack/repos/builtin/packages/mozjpeg/package.py @@ -40,7 +40,7 @@ class Mozjpeg(CMakePackage): @property def libs(self): - return find_libraries("libjpeg*", root=self.prefix, recursive=True) + return find_libraries("libjpeg*", root=self.prefix) def cmake_args(self): args = [ diff --git a/var/spack/repos/builtin/packages/mpt/package.py b/var/spack/repos/builtin/packages/mpt/package.py index 1a45de40a09..edb5d61eb10 100644 --- a/var/spack/repos/builtin/packages/mpt/package.py +++ b/var/spack/repos/builtin/packages/mpt/package.py @@ -32,7 +32,7 @@ def libs(self): if "cxx" in query_parameters: libraries = ["libmpicxx"] + libraries - return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=True) def setup_dependent_build_environment(self, env, dependent_spec): # use the Spack compiler wrappers under MPI diff --git a/var/spack/repos/builtin/packages/mvapich/package.py b/var/spack/repos/builtin/packages/mvapich/package.py index 55aa19f3e2b..54c2e57709a 100644 --- a/var/spack/repos/builtin/packages/mvapich/package.py +++ b/var/spack/repos/builtin/packages/mvapich/package.py @@ -145,7 +145,7 @@ def libs(self): if "cxx" in query_parameters: libraries = ["libmpicxx"] + libraries - return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=True) @property def process_manager_options(self): diff --git a/var/spack/repos/builtin/packages/mvapich2-gdr/package.py b/var/spack/repos/builtin/packages/mvapich2-gdr/package.py index ae9ad23d02f..55c8a331812 100755 --- a/var/spack/repos/builtin/packages/mvapich2-gdr/package.py +++ b/var/spack/repos/builtin/packages/mvapich2-gdr/package.py @@ -92,7 +92,7 @@ def libs(self): if "cxx" in query_parameters: libraries = ["libmpicxx"] + libraries - return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=True) @property def process_manager_options(self): diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 23129c3ec0c..8b7c3b96802 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -274,7 +274,7 @@ def libs(self): if "cxx" in query_parameters: libraries = ["libmpicxx"] + libraries - return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=True) @property def process_manager_options(self): diff --git a/var/spack/repos/builtin/packages/mvapich2x/package.py b/var/spack/repos/builtin/packages/mvapich2x/package.py index 5962ef69683..efc1f3d0be3 100644 --- a/var/spack/repos/builtin/packages/mvapich2x/package.py +++ b/var/spack/repos/builtin/packages/mvapich2x/package.py @@ -97,7 +97,7 @@ def libs(self): if "cxx" in query_parameters: libraries = ["libmpicxx"] + libraries - return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=True) @property def process_feature_options(self): diff --git a/var/spack/repos/builtin/packages/mysql/package.py b/var/spack/repos/builtin/packages/mysql/package.py index 1e7cb834d36..2ae669a8a69 100644 --- a/var/spack/repos/builtin/packages/mysql/package.py +++ b/var/spack/repos/builtin/packages/mysql/package.py @@ -161,7 +161,7 @@ def command(self): @property def libs(self): - return find_libraries("libmysqlclient", root=self.prefix, recursive=True) + return find_libraries("libmysqlclient", root=self.prefix) def url_for_version(self, version): url = "https://dev.mysql.com/get/Downloads/MySQL-{0}/mysql-{1}.tar.gz" diff --git a/var/spack/repos/builtin/packages/ncio/package.py b/var/spack/repos/builtin/packages/ncio/package.py index d710a81923f..e1b87c64424 100644 --- a/var/spack/repos/builtin/packages/ncio/package.py +++ b/var/spack/repos/builtin/packages/ncio/package.py @@ -30,7 +30,7 @@ class Ncio(CMakePackage): depends_on("netcdf-fortran") def setup_run_environment(self, env): - lib = find_libraries("libncio", root=self.prefix, shared=False, recursive=True) + lib = find_libraries("libncio", root=self.prefix, shared=False) env.set("NCIO_LIB", lib[0]) env.set("NCIO_INC", join_path(self.prefix, "include")) env.set("NCIO_LIBDIR", lib[0]) diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py index 6f3b424ae36..ee0cc9b4767 100644 --- a/var/spack/repos/builtin/packages/ncurses/package.py +++ b/var/spack/repos/builtin/packages/ncurses/package.py @@ -248,4 +248,4 @@ def libs(self): libraries.extend(libs) if wide: libraries.extend(wlibs) - return find_libraries(libraries, root=self.prefix, recursive=True) + return find_libraries(libraries, root=self.prefix) diff --git a/var/spack/repos/builtin/packages/nekrs/package.py b/var/spack/repos/builtin/packages/nekrs/package.py index 3376682772f..6f3d6d0b4d1 100644 --- a/var/spack/repos/builtin/packages/nekrs/package.py +++ b/var/spack/repos/builtin/packages/nekrs/package.py @@ -123,7 +123,7 @@ def setup_build_environment(self, env): if "+cuda" in spec: cuda_dir = spec["cuda"].prefix cuda_libs_list = ["libcuda", "libcudart", "libOpenCL"] - cuda_libs = find_libraries(cuda_libs_list, cuda_dir, shared=True, recursive=True) + cuda_libs = find_libraries(cuda_libs_list, cuda_dir, shared=True) env.set("OCCA_INCLUDE_PATH", cuda_dir.include) env.set("OCCA_LIBRARY_PATH", ":".join(cuda_libs.directories)) env.set("OCCA_CUDA_ENABLED", "1") diff --git a/var/spack/repos/builtin/packages/nektools/package.py b/var/spack/repos/builtin/packages/nektools/package.py index 90e7951449a..7f2b34ebaf1 100644 --- a/var/spack/repos/builtin/packages/nektools/package.py +++ b/var/spack/repos/builtin/packages/nektools/package.py @@ -85,17 +85,17 @@ def install(self, spec, prefix): fflags = spec.compiler_flags["fflags"] cflags = spec.compiler_flags["cflags"] if ("+prenek" in spec) or ("+postnek" in spec): - libx11_h = find_headers("Xlib", spec["libx11"].prefix.include, recursive=True) + libx11_h = find_headers("Xlib", spec["libx11"].prefix.include) if not libx11_h: raise RuntimeError("Xlib.h not found in %s" % spec["libx11"].prefix.include) cflags += ["-I%s" % os.path.dirname(libx11_h.directories[0])] - xproto_h = find_headers("X", spec["xproto"].prefix.include, recursive=True) + xproto_h = find_headers("X", spec["xproto"].prefix.include) if not xproto_h: raise RuntimeError("X.h not found in %s" % spec["xproto"].prefix.include) cflags += ["-I%s" % os.path.dirname(xproto_h.directories[0])] - libxt_h = find_headers("Intrinsic", spec["libxt"].prefix.include, recursive=True) + libxt_h = find_headers("Intrinsic", spec["libxt"].prefix.include) if not libxt_h: raise RuntimeError( "X11/Intrinsic.h not found in %s" % spec["libxt"].prefix.include @@ -133,13 +133,9 @@ def install(self, spec, prefix): # addition of the underscore. filter_file(r"^\$FC -c ", "$FC -qextname -c ", "maketools") - libx11_lib = find_libraries( - "libX11", spec["libx11"].prefix.lib, shared=True, recursive=True - ) + libx11_lib = find_libraries("libX11", spec["libx11"].prefix.lib, shared=True) if not libx11_lib: - libx11_lib = find_libraries( - "libX11", spec["libx11"].prefix.lib64, shared=True, recursive=True - ) + libx11_lib = find_libraries("libX11", spec["libx11"].prefix.lib64, shared=True) if not libx11_lib: raise RuntimeError("libX11 not found in %s/{lib,lib64}" % spec["libx11"].prefix) # There is no other way to set the X11 library path except brute diff --git a/var/spack/repos/builtin/packages/nest/package.py b/var/spack/repos/builtin/packages/nest/package.py index 416930ac7b3..fd22c2b00b0 100644 --- a/var/spack/repos/builtin/packages/nest/package.py +++ b/var/spack/repos/builtin/packages/nest/package.py @@ -136,7 +136,7 @@ def install_headers(self): mkdirp(path_headers) for suffix in ["h", "hpp"]: - for f in find_headers("*.{0}".format(suffix), self.stage.source_path, recursive=True): + for f in find_headers("*.{0}".format(suffix), self.stage.source_path): install(f, path_headers) def setup_run_environment(self, env): diff --git a/var/spack/repos/builtin/packages/netcdf-c/package.py b/var/spack/repos/builtin/packages/netcdf-c/package.py index 986fbfe7492..536b8aebae1 100644 --- a/var/spack/repos/builtin/packages/netcdf-c/package.py +++ b/var/spack/repos/builtin/packages/netcdf-c/package.py @@ -302,7 +302,7 @@ def flag_handler(self, name, flags): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libnetcdf", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libnetcdf", root=self.prefix, shared=shared) class BaseBuilder(metaclass=spack.builder.PhaseCallbacksMeta): diff --git a/var/spack/repos/builtin/packages/netcdf-cxx/package.py b/var/spack/repos/builtin/packages/netcdf-cxx/package.py index 4193c589498..9484c22fdf8 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx/package.py @@ -31,7 +31,7 @@ class NetcdfCxx(AutotoolsPackage): @property def libs(self): shared = True - return find_libraries("libnetcdf_c++", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libnetcdf_c++", root=self.prefix, shared=shared) def configure_args(self): args = [] diff --git a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py index 046c17a3fc1..dcca762daa2 100644 --- a/var/spack/repos/builtin/packages/netcdf-cxx4/package.py +++ b/var/spack/repos/builtin/packages/netcdf-cxx4/package.py @@ -52,7 +52,7 @@ def libs(self): libraries = ["libnetcdf_c++4"] shared = "+shared" in self.spec - libs = find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + libs = find_libraries(libraries, root=self.prefix, shared=shared) if libs: return libs diff --git a/var/spack/repos/builtin/packages/netcdf-fortran/package.py b/var/spack/repos/builtin/packages/netcdf-fortran/package.py index ec74f25fc43..a5d85604756 100644 --- a/var/spack/repos/builtin/packages/netcdf-fortran/package.py +++ b/var/spack/repos/builtin/packages/netcdf-fortran/package.py @@ -106,7 +106,7 @@ def libs(self): else: shared = "+shared" in self.spec - libs = find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + libs = find_libraries(libraries, root=self.prefix, shared=shared) if libs: return libs diff --git a/var/spack/repos/builtin/packages/netlib-lapack/package.py b/var/spack/repos/builtin/packages/netlib-lapack/package.py index 20d9a0664f5..7772fd7d7f0 100644 --- a/var/spack/repos/builtin/packages/netlib-lapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-lapack/package.py @@ -167,7 +167,7 @@ def blas_libs(self): } key = tuple(sorted(query_parameters)) libraries = query2libraries[key] - return find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=shared) @property def lapack_libs(self): @@ -184,7 +184,7 @@ def lapack_libs(self): } key = tuple(sorted(query_parameters)) libraries = query2libraries[key] - return find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=shared) @property def headers(self): diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index 245dcfaf0c7..7a404bfd476 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -55,7 +55,7 @@ def libs(self): # Note that the default will be to search # for 'libnetlib-scalapack.' shared = True if "+shared" in self.spec else False - return find_libraries("libscalapack", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libscalapack", root=self.prefix, shared=shared) def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/netlib-xblas/package.py b/var/spack/repos/builtin/packages/netlib-xblas/package.py index 0b04a8f895e..350ebad658b 100644 --- a/var/spack/repos/builtin/packages/netlib-xblas/package.py +++ b/var/spack/repos/builtin/packages/netlib-xblas/package.py @@ -37,7 +37,7 @@ class NetlibXblas(AutotoolsPackage): @property def libs(self): - return find_libraries(["libxblas"], root=self.prefix, shared=False, recursive=True) + return find_libraries(["libxblas"], root=self.prefix, shared=False) def configure_args(self): args = [] diff --git a/var/spack/repos/builtin/packages/nspr/package.py b/var/spack/repos/builtin/packages/nspr/package.py index a2fa85d11ee..6f078511a2f 100644 --- a/var/spack/repos/builtin/packages/nspr/package.py +++ b/var/spack/repos/builtin/packages/nspr/package.py @@ -38,6 +38,6 @@ def configure_args(self): @property def headers(self): - headers = find_headers("*", self.prefix.include, recursive=True) + headers = find_headers("*", self.prefix.include) headers.directories = [self.prefix.include.nspr] return headers diff --git a/var/spack/repos/builtin/packages/ntpoly/package.py b/var/spack/repos/builtin/packages/ntpoly/package.py index 69b22e948be..2981c3b614b 100644 --- a/var/spack/repos/builtin/packages/ntpoly/package.py +++ b/var/spack/repos/builtin/packages/ntpoly/package.py @@ -43,6 +43,4 @@ def cmake_args(self): @property def libs(self): - return find_libraries( - ["libNTPoly", "libNTPolyCPP", "libNTPolyWrapper"], root=self.home, recursive=True - ) + return find_libraries(["libNTPoly", "libNTPolyCPP", "libNTPolyWrapper"], root=self.home) diff --git a/var/spack/repos/builtin/packages/nvhpc/package.py b/var/spack/repos/builtin/packages/nvhpc/package.py index ce918e96965..1242eb86a59 100644 --- a/var/spack/repos/builtin/packages/nvhpc/package.py +++ b/var/spack/repos/builtin/packages/nvhpc/package.py @@ -589,7 +589,7 @@ def libs(self): libs.append("liblapack") libs.append("libnvf") - return find_libraries(libs, root=prefix, recursive=True) + return find_libraries(libs, root=prefix) # Avoid binding stub libraries by absolute path non_bindable_shared_objects = ["stubs"] diff --git a/var/spack/repos/builtin/packages/nvpl-blas/package.py b/var/spack/repos/builtin/packages/nvpl-blas/package.py index 0bd0a769df7..41895479eff 100644 --- a/var/spack/repos/builtin/packages/nvpl-blas/package.py +++ b/var/spack/repos/builtin/packages/nvpl-blas/package.py @@ -69,7 +69,7 @@ def blas_libs(self): name = ["libnvpl_blas_core", f"libnvpl_blas_{int_type}_{threading_type}"] - return find_libraries(name, spec.prefix.lib, shared=True, recursive=True) + return find_libraries(name, spec.prefix.lib, shared=True) def install(self, spec, prefix): install_tree(".", prefix) diff --git a/var/spack/repos/builtin/packages/nvpl-lapack/package.py b/var/spack/repos/builtin/packages/nvpl-lapack/package.py index e76e0986362..b02cf4e889f 100644 --- a/var/spack/repos/builtin/packages/nvpl-lapack/package.py +++ b/var/spack/repos/builtin/packages/nvpl-lapack/package.py @@ -77,7 +77,7 @@ def lapack_libs(self): name = ["libnvpl_lapack_core", f"libnvpl_lapack_{int_type}_{threading_type}"] - return find_libraries(name, spec.prefix.lib, shared=True, recursive=True) + return find_libraries(name, spec.prefix.lib, shared=True) def install(self, spec, prefix): install_tree(".", prefix) diff --git a/var/spack/repos/builtin/packages/occa/package.py b/var/spack/repos/builtin/packages/occa/package.py index 941cbf3ca55..7519be197b4 100644 --- a/var/spack/repos/builtin/packages/occa/package.py +++ b/var/spack/repos/builtin/packages/occa/package.py @@ -94,7 +94,7 @@ def setup_build_environment(self, env): if "+cuda" in spec: cuda_dir = spec["cuda"].prefix cuda_libs_list = ["libcuda", "libcudart", "libOpenCL"] - cuda_libs = find_libraries(cuda_libs_list, cuda_dir, shared=True, recursive=True) + cuda_libs = find_libraries(cuda_libs_list, cuda_dir, shared=True) env.set("OCCA_INCLUDE_PATH", cuda_dir.include) env.set("OCCA_LIBRARY_PATH", ":".join(cuda_libs.directories)) else: diff --git a/var/spack/repos/builtin/packages/ompt-openmp/package.py b/var/spack/repos/builtin/packages/ompt-openmp/package.py index dbb7113ff07..5af55b7fdb9 100644 --- a/var/spack/repos/builtin/packages/ompt-openmp/package.py +++ b/var/spack/repos/builtin/packages/ompt-openmp/package.py @@ -33,4 +33,4 @@ class OmptOpenmp(CMakePackage): @property def libs(self): - return find_libraries("libomp", root=self.prefix, recursive=True) + return find_libraries("libomp", root=self.prefix) diff --git a/var/spack/repos/builtin/packages/oneapi-igc/package.py b/var/spack/repos/builtin/packages/oneapi-igc/package.py index d9217c63890..7ad8435dd53 100644 --- a/var/spack/repos/builtin/packages/oneapi-igc/package.py +++ b/var/spack/repos/builtin/packages/oneapi-igc/package.py @@ -31,4 +31,4 @@ def install(self, spec, prefix): @property def libs(self): - return find_libraries(["libigc"], root=self.prefix, recursive=True) + return find_libraries(["libigc"], root=self.prefix) diff --git a/var/spack/repos/builtin/packages/oniguruma/package.py b/var/spack/repos/builtin/packages/oniguruma/package.py index a7afee51cb7..9ba4c41d1e8 100644 --- a/var/spack/repos/builtin/packages/oniguruma/package.py +++ b/var/spack/repos/builtin/packages/oniguruma/package.py @@ -23,7 +23,7 @@ class Oniguruma(AutotoolsPackage): @property def libs(self): - return find_libraries("libonig", root=self.prefix, recursive=True) + return find_libraries("libonig", root=self.prefix) @run_after("install") @on_package_attributes(run_tests=True) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 2785f3a06d6..40e5f43a576 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -328,7 +328,7 @@ def libs(self): if suffix != "none": name = [x + suffix for x in name] - return find_libraries(name, spec.prefix, shared=search_shared, recursive=True) + return find_libraries(name, spec.prefix, shared=search_shared) class MakefileBuilder(spack.build_systems.makefile.MakefileBuilder): diff --git a/var/spack/repos/builtin/packages/opencv/package.py b/var/spack/repos/builtin/packages/opencv/package.py index 58110998851..8135a28707b 100644 --- a/var/spack/repos/builtin/packages/opencv/package.py +++ b/var/spack/repos/builtin/packages/opencv/package.py @@ -1050,4 +1050,4 @@ def cmake_args(self): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libopencv_*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libopencv_*", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/opengl/package.py b/var/spack/repos/builtin/packages/opengl/package.py index 7d16073ed4a..182149febb2 100644 --- a/var/spack/repos/builtin/packages/opengl/package.py +++ b/var/spack/repos/builtin/packages/opengl/package.py @@ -97,7 +97,7 @@ def gl_headers(self): header_name = "OpenGL/gl" else: header_name = "GL/gl" - return find_headers(header_name, root=self.prefix, recursive=True) + return find_headers(header_name, root=self.prefix) @property def gl_libs(self): @@ -108,4 +108,4 @@ def gl_libs(self): lib_name = "libOpenGL" else: lib_name = "libGL" - return find_libraries(lib_name, root=self.prefix, recursive=True) + return find_libraries(lib_name, root=self.prefix) diff --git a/var/spack/repos/builtin/packages/openglu/package.py b/var/spack/repos/builtin/packages/openglu/package.py index 32fba46bd0b..a0005f15ecc 100644 --- a/var/spack/repos/builtin/packages/openglu/package.py +++ b/var/spack/repos/builtin/packages/openglu/package.py @@ -65,4 +65,4 @@ def fetcher(self): @property def libs(self): - return find_libraries("libGLU", self.prefix, shared=True, recursive=True) + return find_libraries("libGLU", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/openjdk/package.py b/var/spack/repos/builtin/packages/openjdk/package.py index bcaec85a861..8517c743d35 100644 --- a/var/spack/repos/builtin/packages/openjdk/package.py +++ b/var/spack/repos/builtin/packages/openjdk/package.py @@ -481,7 +481,7 @@ def libs(self): Search recursively to find the correct library location.""" - return find_libraries(["libjvm"], root=self.home, recursive=True) + return find_libraries(["libjvm"], root=self.home) def install(self, spec, prefix): top_dir = "Contents/Home/" if platform.system() == "Darwin" else "." diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py index 86d2af471a5..ce90bfde65a 100644 --- a/var/spack/repos/builtin/packages/openjpeg/package.py +++ b/var/spack/repos/builtin/packages/openjpeg/package.py @@ -67,9 +67,7 @@ def url_for_version(self, version): @property def libs(self): - return find_libraries( - "libopenjp{0}".format(self.version.up_to(1)), root=self.prefix, recursive=True - ) + return find_libraries("libopenjp{0}".format(self.version.up_to(1)), root=self.prefix) def cmake_args(self): args = [ diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 58105a90f75..2482d961000 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -841,10 +841,7 @@ def url_for_version(self, version): @property def headers(self): - hdrs = HeaderList(find(self.prefix.include, "mpi.h", recursive=False)) - if not hdrs: - hdrs = HeaderList(find(self.prefix, "mpi.h", recursive=True)) - return hdrs or None + return find_headers("mpi.h", self.prefix) @property def libs(self): @@ -854,7 +851,7 @@ def libs(self): if "cxx" in query_parameters: libraries = ["libmpi_cxx"] + libraries - return find_libraries(libraries, root=self.prefix, shared=True, recursive=True) + return find_libraries(libraries, root=self.prefix, shared=True) def setup_run_environment(self, env): # Because MPI is both a runtime and a compiler, we have to setup the diff --git a/var/spack/repos/builtin/packages/openspeedshop-utils/package.py b/var/spack/repos/builtin/packages/openspeedshop-utils/package.py index c77a608fd21..df079c9d2da 100644 --- a/var/spack/repos/builtin/packages/openspeedshop-utils/package.py +++ b/var/spack/repos/builtin/packages/openspeedshop-utils/package.py @@ -289,7 +289,7 @@ def setup_run_environment(self, env): # required for OpenSpeedShop to find loop level # performance information dyninst_libdir = find_libraries( - "libdyninstAPI_RT", root=self.spec["dyninst"].prefix, shared=True, recursive=True + "libdyninstAPI_RT", root=self.spec["dyninst"].prefix, shared=True ) # Set Dyninst RT library path to support OSS loop resolution code diff --git a/var/spack/repos/builtin/packages/openspeedshop/package.py b/var/spack/repos/builtin/packages/openspeedshop/package.py index 6dddc60f97d..27f8a573f15 100644 --- a/var/spack/repos/builtin/packages/openspeedshop/package.py +++ b/var/spack/repos/builtin/packages/openspeedshop/package.py @@ -307,7 +307,7 @@ def setup_run_environment(self, env): # required for OpenSpeedShop to find loop level # performance information dyninst_libdir = find_libraries( - "libdyninstAPI_RT", root=self.spec["dyninst"].prefix, shared=True, recursive=True + "libdyninstAPI_RT", root=self.spec["dyninst"].prefix, shared=True ) # Set Dyninst RT library path to support OSS loop resolution code diff --git a/var/spack/repos/builtin/packages/osmesa/package.py b/var/spack/repos/builtin/packages/osmesa/package.py index 682032655bc..e35d18d98b4 100644 --- a/var/spack/repos/builtin/packages/osmesa/package.py +++ b/var/spack/repos/builtin/packages/osmesa/package.py @@ -30,7 +30,7 @@ def libs(self): @property def gl_headers(self): - return find_headers("GL/gl", root=self.gl_home, recursive=True) + return find_headers("GL/gl", root=self.gl_home) @property def gl_libs(self): diff --git a/var/spack/repos/builtin/packages/ossp-uuid/package.py b/var/spack/repos/builtin/packages/ossp-uuid/package.py index 1db80850dd7..69fc5e61874 100644 --- a/var/spack/repos/builtin/packages/ossp-uuid/package.py +++ b/var/spack/repos/builtin/packages/ossp-uuid/package.py @@ -29,8 +29,8 @@ class OsspUuid(AutotoolsPackage): @property def libs(self): - return find_libraries("libuuid", self.prefix, recursive=True) + return find_libraries("libuuid", self.prefix) @property def headers(self): - return find_headers("uuid", self.prefix, recursive=True) + return find_headers("uuid", self.prefix) diff --git a/var/spack/repos/builtin/packages/parallel-netcdf/package.py b/var/spack/repos/builtin/packages/parallel-netcdf/package.py index f7bf6935779..65d6af5fb8f 100644 --- a/var/spack/repos/builtin/packages/parallel-netcdf/package.py +++ b/var/spack/repos/builtin/packages/parallel-netcdf/package.py @@ -98,7 +98,7 @@ def libs(self): else: shared = "+shared" in self.spec - libs = find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + libs = find_libraries(libraries, root=self.prefix, shared=shared) if libs: return libs diff --git a/var/spack/repos/builtin/packages/parflow/package.py b/var/spack/repos/builtin/packages/parflow/package.py index 937ab1786d0..6ccc5251e6e 100644 --- a/var/spack/repos/builtin/packages/parflow/package.py +++ b/var/spack/repos/builtin/packages/parflow/package.py @@ -47,9 +47,7 @@ def cmake_args(self): "-DPARFLOW_HAVE_CLM=TRUE", "-DTCL_TCLSH={0}".format(spec["tcl"].prefix.bin.tclsh), "-DTCL_LIBRARY={0}".format( - LibraryList( - find_libraries("libtcl*", self.spec["tcl"].prefix, shared=True, recursive=True) - ) + find_libraries("libtcl*", self.spec["tcl"].prefix, shared=True) ), "-DHDF5_ROOT={0}".format(spec["hdf5"].prefix), "-DSILO_ROOT={0}".format(spec["silo"].prefix), diff --git a/var/spack/repos/builtin/packages/pcre2/package.py b/var/spack/repos/builtin/packages/pcre2/package.py index df79accc6ed..6f90999c1ca 100644 --- a/var/spack/repos/builtin/packages/pcre2/package.py +++ b/var/spack/repos/builtin/packages/pcre2/package.py @@ -52,9 +52,7 @@ def libs(self): name = "lib" + name if self.spec.satisfies("platform=windows") and not is_shared: name += "-static" - return find_libraries( - name, root=self.prefix, recursive=True, shared=is_shared, runtime=False - ) + return find_libraries(name, root=self.prefix, shared=is_shared, runtime=False) class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder): diff --git a/var/spack/repos/builtin/packages/pgplot/package.py b/var/spack/repos/builtin/packages/pgplot/package.py index f3204fc95fa..ec14b8f9edf 100644 --- a/var/spack/repos/builtin/packages/pgplot/package.py +++ b/var/spack/repos/builtin/packages/pgplot/package.py @@ -173,7 +173,7 @@ def libs(self): libnames = ["libpgplot"] else: libnames = ["libcpgplot", "libpgplot"] - return find_libraries(libnames, root=self.prefix, shared=shared, recursive=True) + return find_libraries(libnames, root=self.prefix, shared=shared) def setup_run_environment(self, env): env.set("PGPLOT_FONT", self.prefix.include + "/grfont.dat") diff --git a/var/spack/repos/builtin/packages/pixman/package.py b/var/spack/repos/builtin/packages/pixman/package.py index a1abb45bba7..026d7f1bc96 100644 --- a/var/spack/repos/builtin/packages/pixman/package.py +++ b/var/spack/repos/builtin/packages/pixman/package.py @@ -64,9 +64,7 @@ def patch_config_h_for_intel(self): @property def libs(self): - return find_libraries( - "libpixman-1", self.prefix, shared=self.spec.satisfies("+shared"), recursive=True - ) + return find_libraries("libpixman-1", self.prefix, shared=self.spec.satisfies("+shared")) def configure_args(self): args = ["--enable-libpng", "--disable-gtk", "--with-pic"] diff --git a/var/spack/repos/builtin/packages/plplot/package.py b/var/spack/repos/builtin/packages/plplot/package.py index 4e3d1483991..9235bbb3193 100644 --- a/var/spack/repos/builtin/packages/plplot/package.py +++ b/var/spack/repos/builtin/packages/plplot/package.py @@ -76,18 +76,10 @@ def cmake_args(self): args += [ "-DTCL_INCLUDE_PATH={0}/include".format(self.spec["tcl"].headers.directories[0]), "-DTCL_LIBRARY={0}".format( - LibraryList( - find_libraries( - "libtcl*", self.spec["tcl"].prefix, shared=True, recursive=True - ) - ) + find_libraries("libtcl*", self.spec["tcl"].prefix, shared=True) ), "-DTCL_STUB_LIBRARY={0}".format( - LibraryList( - find_libraries( - "libtclstub*", self.spec["tcl"].prefix, shared=False, recursive=True - ) - ) + find_libraries("libtclstub*", self.spec["tcl"].prefix, shared=False) ), ] else: diff --git a/var/spack/repos/builtin/packages/postgresql/package.py b/var/spack/repos/builtin/packages/postgresql/package.py index 3dafdc5ecd0..5be94b926a3 100644 --- a/var/spack/repos/builtin/packages/postgresql/package.py +++ b/var/spack/repos/builtin/packages/postgresql/package.py @@ -161,7 +161,7 @@ def libs(self): "libpgtypes", "libpq", ] - fl_stat = find_libraries(stat_libs, self.prefix, shared=False, recursive=True) + fl_stat = find_libraries(stat_libs, self.prefix, shared=False) dyn_libs = [ "libecpg_compat", @@ -179,6 +179,6 @@ def libs(self): if "+tcl" in self.spec: dyn_libs.append("pltcl") - fl_dyn = find_libraries(dyn_libs, self.prefix, shared=True, recursive=True) + fl_dyn = find_libraries(dyn_libs, self.prefix, shared=True) return fl_dyn + fl_stat diff --git a/var/spack/repos/builtin/packages/ppopen-math-vis/package.py b/var/spack/repos/builtin/packages/ppopen-math-vis/package.py index eb32035682d..bd06dbc02bb 100644 --- a/var/spack/repos/builtin/packages/ppopen-math-vis/package.py +++ b/var/spack/repos/builtin/packages/ppopen-math-vis/package.py @@ -51,5 +51,5 @@ def install(self, spec, prefix): @property def libs(self): return find_libraries( - ["libfppohvisfdm3d", "libppohvisfdm3d"], root=self.prefix, shared=False, recursive=True + ["libfppohvisfdm3d", "libppohvisfdm3d"], root=self.prefix, shared=False ) diff --git a/var/spack/repos/builtin/packages/qhull/package.py b/var/spack/repos/builtin/packages/qhull/package.py index 20f168d22da..37b316aacef 100644 --- a/var/spack/repos/builtin/packages/qhull/package.py +++ b/var/spack/repos/builtin/packages/qhull/package.py @@ -45,9 +45,9 @@ def libs(self): # in 2020.2 the libqhull.so library was deprecated in favor of # libqhull_r.so if self.spec.satisfies("@2020.2:"): - return find_libraries("libqhull_r", self.prefix, shared=True, recursive=True) + return find_libraries("libqhull_r", self.prefix, shared=True) else: - return find_libraries("libqhull", self.prefix, shared=True, recursive=True) + return find_libraries("libqhull", self.prefix, shared=True) @run_after("install") def darwin_fix(self): diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index 39f1d108629..4b2822f0e6f 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -268,7 +268,7 @@ def _get_sys_type(self, spec): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libRAJA", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libRAJA", root=self.prefix, shared=shared) @property def cache_name(self): diff --git a/var/spack/repos/builtin/packages/reprimand/package.py b/var/spack/repos/builtin/packages/reprimand/package.py index 521ac78f42c..c0c805c0ac5 100644 --- a/var/spack/repos/builtin/packages/reprimand/package.py +++ b/var/spack/repos/builtin/packages/reprimand/package.py @@ -63,4 +63,4 @@ def meson_args(self): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libRePrimAnd*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libRePrimAnd*", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/rnpletal/package.py b/var/spack/repos/builtin/packages/rnpletal/package.py index f7f862af075..1407d9ac6f2 100644 --- a/var/spack/repos/builtin/packages/rnpletal/package.py +++ b/var/spack/repos/builtin/packages/rnpletal/package.py @@ -83,6 +83,4 @@ def install(self, spec, prefix): @property def libs(self): - return find_libraries( - ["libbbhutil", "librnpl"], root=self.prefix, shared=False, recursive=True - ) + return find_libraries(["libbbhutil", "librnpl"], root=self.prefix, shared=False) diff --git a/var/spack/repos/builtin/packages/scorep/package.py b/var/spack/repos/builtin/packages/scorep/package.py index d4076a89a19..b0440662cdc 100644 --- a/var/spack/repos/builtin/packages/scorep/package.py +++ b/var/spack/repos/builtin/packages/scorep/package.py @@ -152,7 +152,7 @@ def url_for_version(self, version): conflicts("hip@6.0:", when="@1.0:8.3+hip") def find_libpath(self, libname, root): - libs = find_libraries(libname, root, shared=True, recursive=True) + libs = find_libraries(libname, root, shared=True) if len(libs.directories) == 0: return None return libs.directories[0] diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index e470491d847..fac8845cd10 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -113,7 +113,7 @@ def libs(self): else: libraries = ["libptesmumps"] + libraries - scotchlibs = find_libraries(libraries, root=self.prefix, recursive=True, shared=shared) + scotchlibs = find_libraries(libraries, root=self.prefix, shared=shared) if "+compression" in self.spec: zlibs = self.spec["zlib-api"].libs diff --git a/var/spack/repos/builtin/packages/serialbox/package.py b/var/spack/repos/builtin/packages/serialbox/package.py index 0618fe9db2b..869f32ecf54 100644 --- a/var/spack/repos/builtin/packages/serialbox/package.py +++ b/var/spack/repos/builtin/packages/serialbox/package.py @@ -128,7 +128,7 @@ def libs(self): "{0}{1}".format(name, "Shared" if shared else "Static") for name in libraries ] - libs = find_libraries(libraries, root=self.prefix, shared=shared, recursive=True) + libs = find_libraries(libraries, root=self.prefix, shared=shared) if libs: return libs diff --git a/var/spack/repos/builtin/packages/sfcio/package.py b/var/spack/repos/builtin/packages/sfcio/package.py index afe4ed84c7f..2abf86a7e86 100644 --- a/var/spack/repos/builtin/packages/sfcio/package.py +++ b/var/spack/repos/builtin/packages/sfcio/package.py @@ -33,7 +33,7 @@ def cmake_args(self): return args def setup_run_environment(self, env): - lib = find_libraries("libsfcio", root=self.prefix, shared=False, recursive=True) + lib = find_libraries("libsfcio", root=self.prefix, shared=False) # Only one library version, but still need to set _4 to make NCO happy for suffix in ("4", ""): env.set("SFCIO_LIB" + suffix, lib[0]) diff --git a/var/spack/repos/builtin/packages/sigio/package.py b/var/spack/repos/builtin/packages/sigio/package.py index 305f0e9958b..a37bc38f90d 100644 --- a/var/spack/repos/builtin/packages/sigio/package.py +++ b/var/spack/repos/builtin/packages/sigio/package.py @@ -31,7 +31,7 @@ def cmake_args(self): return args def setup_run_environment(self, env): - lib = find_libraries("libsigio", root=self.prefix, shared=False, recursive=True) + lib = find_libraries("libsigio", root=self.prefix, shared=False) # Only one library version, but still need to set _4 to make NCO happy for suffix in ("4", ""): env.set("SIGIO_LIB" + suffix, lib[0]) diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py index 3416a5c6108..7a912f43f04 100644 --- a/var/spack/repos/builtin/packages/silo/package.py +++ b/var/spack/repos/builtin/packages/silo/package.py @@ -248,4 +248,4 @@ def configure_args(self): @property def libs(self): shared = "+shared" in self.spec - return find_libraries("libsilo*", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libsilo*", root=self.prefix, shared=shared) diff --git a/var/spack/repos/builtin/packages/sparskit/package.py b/var/spack/repos/builtin/packages/sparskit/package.py index 5792c224177..fcae82d98af 100644 --- a/var/spack/repos/builtin/packages/sparskit/package.py +++ b/var/spack/repos/builtin/packages/sparskit/package.py @@ -78,4 +78,4 @@ def install(self, spec, prefix): @property def libs(self): - return find_libraries("libskit*", root=self.prefix, shared=False, recursive=True) + return find_libraries("libskit*", root=self.prefix, shared=False) diff --git a/var/spack/repos/builtin/packages/spglib/package.py b/var/spack/repos/builtin/packages/spglib/package.py index b918fab2d0c..fd84d4fade0 100644 --- a/var/spack/repos/builtin/packages/spglib/package.py +++ b/var/spack/repos/builtin/packages/spglib/package.py @@ -67,7 +67,7 @@ class Spglib(CMakePackage): @property def libs(self): - return find_libraries("libsymspg", root=self.prefix, shared=True, recursive=True) + return find_libraries("libsymspg", root=self.prefix, shared=True) def cmake_args(self): pfx = "SPGLIB_" if self.spec.satisfies("@2.1.0:") else "" diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py index 5be35b6bb04..0629feef977 100644 --- a/var/spack/repos/builtin/packages/sundials/package.py +++ b/var/spack/repos/builtin/packages/sundials/package.py @@ -735,7 +735,7 @@ def libs(self): sun_libs = ["libsundials_" + p for p in query_parameters] is_shared = "+shared" in self.spec - libs = find_libraries(sun_libs, root=self.prefix, shared=is_shared, recursive=True) + libs = find_libraries(sun_libs, root=self.prefix, shared=is_shared) return libs or None # Raise an error if no libs are found diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index d95d80331e5..c13542898a3 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -81,7 +81,7 @@ def _tcl_name(self): @property def libs(self): lib = "lib" if not is_windows else "" - return find_libraries([f"{lib}tcl{self._tcl_name}"], root=self.prefix, recursive=True) + return find_libraries([f"{lib}tcl{self._tcl_name}"], root=self.prefix) @property def command(self): diff --git a/var/spack/repos/builtin/packages/tix/package.py b/var/spack/repos/builtin/packages/tix/package.py index b92541ed07b..00378f329cb 100644 --- a/var/spack/repos/builtin/packages/tix/package.py +++ b/var/spack/repos/builtin/packages/tix/package.py @@ -93,7 +93,7 @@ def test_tcl(self): @property def libs(self): - return find_libraries(["libTix{0}".format(self.version)], root=self.prefix, recursive=True) + return find_libraries(["libTix{0}".format(self.version)], root=self.prefix) def setup_run_environment(self, env): """Set TIX_LIBRARY to the directory containing Tix.tcl. diff --git a/var/spack/repos/builtin/packages/tixi/package.py b/var/spack/repos/builtin/packages/tixi/package.py index 41872d8ca1d..1e1dfde473c 100644 --- a/var/spack/repos/builtin/packages/tixi/package.py +++ b/var/spack/repos/builtin/packages/tixi/package.py @@ -49,7 +49,7 @@ def libs(self): # different library names for tixi@2 and tixi@3 libname = "libtixi3" if "@3" in self.spec else "libTIXI" shared = "~shared" not in self.spec - return find_libraries(libname, root=self.prefix, shared=shared, recursive=True) + return find_libraries(libname, root=self.prefix, shared=shared) def cmake_args(self): return [ diff --git a/var/spack/repos/builtin/packages/tk/package.py b/var/spack/repos/builtin/packages/tk/package.py index 494eae85f4c..42388d15216 100644 --- a/var/spack/repos/builtin/packages/tk/package.py +++ b/var/spack/repos/builtin/packages/tk/package.py @@ -121,9 +121,7 @@ def command(self): @property def libs(self): - return find_libraries( - ["libtk{0}".format(self.version.up_to(2))], root=self.prefix, recursive=True - ) + return find_libraries(["libtk{0}".format(self.version.up_to(2))], root=self.prefix) def _find_script_dir(self): # Put more-specific prefixes first diff --git a/var/spack/repos/builtin/packages/udunits/package.py b/var/spack/repos/builtin/packages/udunits/package.py index 559d5f11cb8..14d9b9b163a 100644 --- a/var/spack/repos/builtin/packages/udunits/package.py +++ b/var/spack/repos/builtin/packages/udunits/package.py @@ -44,7 +44,7 @@ class Udunits(AutotoolsPackage): @property def libs(self): - return find_libraries(["libudunits2"], root=self.prefix, recursive=True, shared=True) + return find_libraries(["libudunits2"], root=self.prefix, shared=True) def configure_args(self): return self.enable_or_disable("shared") diff --git a/var/spack/repos/builtin/packages/unixodbc/package.py b/var/spack/repos/builtin/packages/unixodbc/package.py index 289a763cb4d..b71991356b9 100644 --- a/var/spack/repos/builtin/packages/unixodbc/package.py +++ b/var/spack/repos/builtin/packages/unixodbc/package.py @@ -25,4 +25,4 @@ class Unixodbc(AutotoolsPackage): @property def libs(self): - return find_libraries("libodbc", root=self.prefix, recursive=True) + return find_libraries("libodbc", root=self.prefix) diff --git a/var/spack/repos/builtin/packages/util-linux-uuid/package.py b/var/spack/repos/builtin/packages/util-linux-uuid/package.py index 554158491b0..7d1cc0d548d 100644 --- a/var/spack/repos/builtin/packages/util-linux-uuid/package.py +++ b/var/spack/repos/builtin/packages/util-linux-uuid/package.py @@ -40,11 +40,11 @@ def url_for_version(self, version): @property def libs(self): - return find_libraries("libuuid", self.prefix, recursive=True) + return find_libraries("libuuid", self.prefix) @property def headers(self): - return find_headers("uuid", self.prefix, recursive=True) + return find_headers("uuid", self.prefix) def configure_args(self): config_args = [ diff --git a/var/spack/repos/builtin/packages/veclibfort/package.py b/var/spack/repos/builtin/packages/veclibfort/package.py index a6949f31130..2b20aa7fe99 100644 --- a/var/spack/repos/builtin/packages/veclibfort/package.py +++ b/var/spack/repos/builtin/packages/veclibfort/package.py @@ -38,7 +38,7 @@ class Veclibfort(Package): @property def libs(self): shared = True if "+shared" in self.spec else False - return find_libraries("libvecLibFort", root=self.prefix, shared=shared, recursive=True) + return find_libraries("libvecLibFort", root=self.prefix, shared=shared) @property def headers(self): diff --git a/var/spack/repos/builtin/packages/w3emc/package.py b/var/spack/repos/builtin/packages/w3emc/package.py index 82dbf7bf8c6..d311b753198 100644 --- a/var/spack/repos/builtin/packages/w3emc/package.py +++ b/var/spack/repos/builtin/packages/w3emc/package.py @@ -74,9 +74,7 @@ def setup_run_environment(self, env): shared = self.spec.satisfies("+shared") for suffix in suffixes: - lib = find_libraries( - "libw3emc_" + suffix, root=self.prefix, shared=shared, recursive=True - ) + lib = find_libraries("libw3emc_" + suffix, root=self.prefix, shared=shared) env.set("W3EMC_LIB" + suffix, lib[0]) env.set("W3EMC_INC" + suffix, join_path(self.prefix, "include_" + suffix)) diff --git a/var/spack/repos/builtin/packages/wannier90/package.py b/var/spack/repos/builtin/packages/wannier90/package.py index 417cdc38f7c..a6de6e18a26 100644 --- a/var/spack/repos/builtin/packages/wannier90/package.py +++ b/var/spack/repos/builtin/packages/wannier90/package.py @@ -200,4 +200,4 @@ def install(self, spec, prefix): @property def libs(self): - return find_libraries("libwannier", self.prefix, shared=True, recursive=True) + return find_libraries("libwannier", self.prefix, shared=True) diff --git a/var/spack/repos/builtin/packages/warpx/package.py b/var/spack/repos/builtin/packages/warpx/package.py index 82a8610c4f4..62f22ab59a2 100644 --- a/var/spack/repos/builtin/packages/warpx/package.py +++ b/var/spack/repos/builtin/packages/warpx/package.py @@ -466,9 +466,7 @@ def libs(self): libsuffix = {"1": "1d", "2": "2d", "3": "3d", "rz": "rz"} libs = [] for dim in self.spec.variants["dims"].value: - libs += find_libraries( - ["libwarpx." + libsuffix[dim]], root=self.prefix, recursive=True, shared=True - ) + libs += find_libraries(["libwarpx." + libsuffix[dim]], root=self.prefix, shared=True) libs += find_libraries( ["libablastr"], root=self.prefix, diff --git a/var/spack/repos/builtin/packages/wgl/package.py b/var/spack/repos/builtin/packages/wgl/package.py index 9d02f3c1394..5cc2580d709 100644 --- a/var/spack/repos/builtin/packages/wgl/package.py +++ b/var/spack/repos/builtin/packages/wgl/package.py @@ -94,9 +94,7 @@ def _spec_arch_to_sdk_arch(self): # As noted above, the headers neccesary to include @property def headers(self): - return find_headers( - "GL", root=os.path.join(self.prefix.Include, str(self.version) + ".0"), recursive=True - ) + return find_headers("GL", root=os.path.join(self.prefix.Include, str(self.version) + ".0")) @property def libs(self): diff --git a/var/spack/repos/builtin/packages/xbraid/package.py b/var/spack/repos/builtin/packages/xbraid/package.py index 4f77813bc5b..a2bbc735380 100644 --- a/var/spack/repos/builtin/packages/xbraid/package.py +++ b/var/spack/repos/builtin/packages/xbraid/package.py @@ -84,4 +84,4 @@ def install(self, spec, prefix): @property def libs(self): - return find_libraries("libbraid", root=self.prefix, shared=False, recursive=True) + return find_libraries("libbraid", root=self.prefix, shared=False) diff --git a/var/spack/repos/builtin/packages/xgboost/package.py b/var/spack/repos/builtin/packages/xgboost/package.py index ea48be3d6ad..abee5bb6990 100644 --- a/var/spack/repos/builtin/packages/xgboost/package.py +++ b/var/spack/repos/builtin/packages/xgboost/package.py @@ -101,8 +101,7 @@ def cmake_args(self): clang_root = os.path.dirname(clang_bin) args += [ self.define( - "OpenMP_libomp_LIBRARY", - find_libraries("libomp", root=clang_root, shared=True, recursive=True), + "OpenMP_libomp_LIBRARY", find_libraries("libomp", root=clang_root, shared=True) ) ] diff --git a/var/spack/repos/builtin/packages/zlib/package.py b/var/spack/repos/builtin/packages/zlib/package.py index c579a838130..65edbf97f90 100644 --- a/var/spack/repos/builtin/packages/zlib/package.py +++ b/var/spack/repos/builtin/packages/zlib/package.py @@ -85,7 +85,7 @@ def determine_version(cls, lib): @property def libs(self): shared = "+shared" in self.spec - return find_libraries(["libz"], root=self.prefix, recursive=True, shared=shared) + return find_libraries(["libz"], root=self.prefix, shared=shared) class SetupEnvironment: