mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-26 12:55:18 +01:00
Find the notmuch shared lib rather than hardode a location
--HG-- extra : transplant_source : %DEOdF%80%83%3A%3D%98%5C%AE%81%FE%BA%EF%1A%16%82u%E8
This commit is contained in:
parent
55f1971437
commit
338e68e545
1 changed files with 8 additions and 1 deletions
|
@ -1,7 +1,14 @@
|
|||
from ctypes import CDLL, c_char_p, c_int
|
||||
from ctypes.util import find_library
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#package-global instance of the notmuch library
|
||||
#TODO: lazy load this on first access?
|
||||
nmlib = CDLL('/usr/local/lib/libnotmuch.so')
|
||||
so = find_library('notmuch')
|
||||
if so is None:
|
||||
raise ImportError("Could not find shared 'notmuch' library.")
|
||||
nmlib = CDLL(so)
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
class STATUS(object):
|
||||
SUCCESS = 0
|
||||
|
|
Loading…
Reference in a new issue