diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/cuda/package.py | 10 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/hypre/package.py | 11 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/sundials/package.py | 13 |
3 files changed, 10 insertions, 24 deletions
diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index 5409a38d52..bb963ec3b2 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -63,14 +63,8 @@ class Cuda(Package): @property def libs(self): - prefix = self.prefix - search_paths = [(prefix.lib, False), (prefix.lib64, False), - (prefix, True)] - for search_root, recursive in search_paths: - libs = find_libraries( - 'libcuda', root=search_root, shared=True, recursive=recursive) - if libs: - break + libs = find_libraries('libcuda', root=self.prefix, shared=True, + recursive=True) filtered_libs = [] # CUDA 10.0 provides Compatability libraries for running newer versions diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 6459ad339c..89c090e954 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -150,12 +150,7 @@ class Hypre(Package): """Export the hypre library. Sample usage: spec['hypre'].libs.ld_flags """ - search_paths = [[self.prefix.lib, False], [self.prefix.lib64, False], - [self.prefix, True]] is_shared = '+shared' in self.spec - for path, recursive in search_paths: - libs = find_libraries('libHYPRE', root=path, - shared=is_shared, recursive=recursive) - if libs: - return libs - return None + libs = find_libraries('libHYPRE', root=self.prefix, shared=is_shared, + recursive=True) + return libs or None diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py index b4882ebbb9..8ccb457644 100644 --- a/var/spack/repos/builtin/packages/sundials/package.py +++ b/var/spack/repos/builtin/packages/sundials/package.py @@ -500,12 +500,9 @@ class Sundials(CMakePackage): # Q: should the result be ordered by dependency? else: sun_libs = ['libsundials_' + p for p in query_parameters] - search_paths = [[self.prefix.lib, False], [self.prefix.lib64, False], - [self.prefix, True]] is_shared = '+shared' in self.spec - for path, recursive in search_paths: - libs = find_libraries(sun_libs, root=path, shared=is_shared, - recursive=recursive) - if libs: - return libs - return None # Raise an error + + libs = find_libraries(sun_libs, root=self.prefix, shared=is_shared, + recursive=True) + + return libs or None # Raise an error if no libs are found |