]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/notmuch/globals.py
Python bindings: CDLL("libnotmuch.3.dylib") on Darwin
[notmuch] / bindings / python / notmuch / globals.py
index c7632c3266d428cc42ee43c652701df13c7364dd..2deb87cf02b15d9a2db642dbec8224290f00d548 100644 (file)
@@ -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.")