drop recursive=True from find_headers / find_libraries in builtin

This commit is contained in:
Harmen Stoppels
2024-11-11 12:40:46 +01:00
parent 4d979b0676
commit 318db244c8
197 changed files with 221 additions and 296 deletions

View File

@@ -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"])

View File

@@ -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):

View File

@@ -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,
)

View File

@@ -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":

View File

@@ -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"""

View File

@@ -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):

View File

@@ -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 = [

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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"])

View File

@@ -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):

View File

@@ -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 = []

View File

@@ -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")

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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",

View File

@@ -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)

View File

@@ -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)

View File

@@ -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":

View File

@@ -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)

View File

@@ -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 = []

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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 = []

View File

@@ -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)

View File

@@ -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")

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 <stage_folder>/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

View File

@@ -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)

View File

@@ -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):

View File

@@ -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

View File

@@ -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"]

View File

@@ -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

View File

@@ -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):

View File

@@ -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":

View File

@@ -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)

View File

@@ -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

View File

@@ -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"):

View File

@@ -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

View File

@@ -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"))

View File

@@ -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])

View File

@@ -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):

View File

@@ -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):

View File

@@ -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

View File

@@ -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}"

View File

@@ -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):

View File

@@ -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

View File

@@ -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(

View File

@@ -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),

View File

@@ -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

View File

@@ -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):

View File

@@ -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 = []

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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.

View File

@@ -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:

View File

@@ -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))

View File

@@ -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))

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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))

View File

@@ -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):

View File

@@ -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):

View File

@@ -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)

View File

@@ -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}"

View File

@@ -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

View File

@@ -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):

View File

@@ -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":

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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):

View File

@@ -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

View File

@@ -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):

View File

@@ -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)

View File

@@ -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)

View File

@@ -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}"

View File

@@ -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))

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

Some files were not shown because too many files have changed in this diff Show More