mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-03 07:11:41 +01:00
Python bindings: CDLL("libnotmuch.3.dylib") on Darwin
Use os.uname() to check for 'Darwin' and load "libnotmuch.3.dylib" instead of "libnotmuch.so.3" if that is the case.
This commit is contained in:
parent
b60fb3309c
commit
acb079e357
1 changed files with 5 additions and 1 deletions
|
@ -22,6 +22,10 @@ from ctypes import CDLL, Structure, POINTER
|
|||
#-----------------------------------------------------------------------------
|
||||
#package-global instance of the notmuch library
|
||||
try:
|
||||
from os import uname
|
||||
if uname()[0] == 'Darwin':
|
||||
nmlib = CDLL("libnotmuch.3.dylib")
|
||||
else:
|
||||
nmlib = CDLL("libnotmuch.so.3")
|
||||
except:
|
||||
raise ImportError("Could not find shared 'notmuch' library.")
|
||||
|
|
Loading…
Reference in a new issue