X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fpython%2Fnotmuch%2Fglobals.py;h=2deb87cf02b15d9a2db642dbec8224290f00d548;hp=c7632c3266d428cc42ee43c652701df13c7364dd;hb=acb079e35726cc421b6a314ab4f26d5eb92feaf1;hpb=b60fb3309cca82dd2789f45ad9cccaacdc291089 diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py index c7632c32..2deb87cf 100644 --- a/bindings/python/notmuch/globals.py +++ b/bindings/python/notmuch/globals.py @@ -22,7 +22,11 @@ from ctypes import CDLL, Structure, POINTER #----------------------------------------------------------------------------- #package-global instance of the notmuch library try: - nmlib = CDLL("libnotmuch.so.3") + 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.")