mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 20:38:08 +01:00
find_library does not read LD_LIBRARY_PATH, but CDLL does.
This commit is contained in:
parent
dfa9eb8afa
commit
f378f45893
1 changed files with 9 additions and 9 deletions
|
@ -3,11 +3,11 @@ from ctypes.util import find_library
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
#package-global instance of the notmuch library
|
#package-global instance of the notmuch library
|
||||||
#TODO: lazy load this on first access?
|
try:
|
||||||
so = find_library('notmuch')
|
nmlib = CDLL("libnotmuch.so.1")
|
||||||
if so is None:
|
except:
|
||||||
raise ImportError("Could not find shared 'notmuch' library.")
|
raise ImportError("Could not find shared 'notmuch' library.")
|
||||||
nmlib = CDLL(so)
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
class Enum(object):
|
class Enum(object):
|
||||||
"""Provides ENUMS as "code=Enum(['a','b','c'])" where code.a=0 etc..."""
|
"""Provides ENUMS as "code=Enum(['a','b','c'])" where code.a=0 etc..."""
|
||||||
|
|
Loading…
Reference in a new issue