diff --git a/libarchive/library.py b/libarchive/library.py index eaa8812..adeadec 100644 --- a/libarchive/library.py +++ b/libarchive/library.py @@ -6,7 +6,7 @@ _LOGGER = logging.getLogger(__name__) -_LIBRARY_NAME = 'libarchive' +_LIBRARY_NAMES = ['libarchive', 'archive'] _LIBRARY_FILENAME = 'libarchive.so' def find_and_load_library(): @@ -29,9 +29,10 @@ def find_and_load_library(): # Search for our library using whatever search-path ctypes uses (not the same # as `LD_LIBRARY_PATH`). - filepath = ctypes.util.find_library(_LIBRARY_NAME) - if filepath is not None: - search_filepaths.append(filepath) + for library_name in _LIBRARY_NAMES: + filepath = ctypes.util.find_library(library_name) + if filepath is not None: + search_filepaths.append(filepath) # Load the first one available.