Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions libarchive/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

_LOGGER = logging.getLogger(__name__)

_LIBRARY_NAME = 'libarchive'
_LIBRARY_NAMES = ['libarchive', 'archive']
_LIBRARY_FILENAME = 'libarchive.so'

def find_and_load_library():
Expand All @@ -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.

Expand Down