aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings/python/notmuch/globals.py
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/python/notmuch/globals.py')
-rw-r--r--bindings/python/notmuch/globals.py6
1 files changed, 5 insertions, 1 deletions
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.")