diff options
Diffstat (limited to 'lib/spack/llnl/util/filesystem.py')
-rw-r--r-- | lib/spack/llnl/util/filesystem.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 53db4bdca9..973d2f9de3 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -64,6 +64,7 @@ __all__ = [ 'is_exe', 'join_path', 'last_modification_time_recursive', + 'library_extensions', 'mkdirp', 'partition_path', 'prefixes', @@ -109,12 +110,15 @@ def path_contains_subdirectory(path, root): return norm_path.startswith(norm_root) +#: This generates the library filenames that may appear on any OS. +library_extensions = ['a', 'la', 'so', 'tbd', 'dylib'] + + def possible_library_filenames(library_names): """Given a collection of library names like 'libfoo', generate the set of - library filenames that may be found on the system (e.g. libfoo.so). This - generates the library filenames that may appear on any OS. + library filenames that may be found on the system (e.g. libfoo.so). """ - lib_extensions = ['a', 'la', 'so', 'tbd', 'dylib'] + lib_extensions = library_extensions return set( '.'.join((lib, extension)) for lib, extension in itertools.product(library_names, lib_extensions)) |