From: Julian Berman Date: Sun, 26 May 2013 03:53:38 +0000 (+2000) Subject: [PATCH] Fix shared library loading in Python bindings. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fbbaa32d915ca9b89fdd22a8a8446251be431f63;p=notmuch-archives.git [PATCH] Fix shared library loading in Python bindings. --- diff --git a/eb/b08979e41db1cc53420d71c2edd0d87cb840d4 b/eb/b08979e41db1cc53420d71c2edd0d87cb840d4 new file mode 100644 index 000000000..920f82b0f --- /dev/null +++ b/eb/b08979e41db1cc53420d71c2edd0d87cb840d4 @@ -0,0 +1,73 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 16372431FB6 + for ; Tue, 28 May 2013 13:23:54 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.379 +X-Spam-Level: +X-Spam-Status: No, score=0.379 tagged_above=-999 required=5 + tests=[NO_DNS_FOR_FROM=0.379] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id Ku0oAvNs8xuL for ; + Tue, 28 May 2013 13:23:46 -0700 (PDT) +X-Greylist: delayed 4202 seconds by postgrey-1.32 at olra; + Tue, 28 May 2013 13:23:46 PDT +Received: from Air.local (static-72-80-117-250.nycmny.fios.verizon.net + [72.80.117.250]) + by olra.theworths.org (Postfix) with ESMTP id 0E98B431FAF + for ; Tue, 28 May 2013 13:23:46 -0700 (PDT) +Received: by air.localhost (Postfix, from userid 501) + id D60E14982E7C; Sat, 25 May 2013 23:53:39 -0400 (EDT) +From: Julian Berman +To: notmuch@notmuchmail.org +Subject: [PATCH] Fix shared library loading in Python bindings. +Date: Sat, 25 May 2013 23:53:38 -0400 +Message-Id: <1369540418-94177-1-git-send-email-Julian@GrayVines.com> +X-Mailer: git-send-email 1.8.3 +X-Mailman-Approved-At: Tue, 28 May 2013 22:56:15 -0700 +Cc: Julian Berman +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Tue, 28 May 2013 20:23:54 -0000 + +Specifically, fixes loading on OS X, where libnotmuch will be +a dylib.: +--- + bindings/python/notmuch/globals.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py +index c7632c3..5e08e73 100644 +--- a/bindings/python/notmuch/globals.py ++++ b/bindings/python/notmuch/globals.py +@@ -18,11 +18,12 @@ Copyright 2010 Sebastian Spaeth + """ + + from ctypes import CDLL, Structure, POINTER ++from ctypes.util import find_library + + #----------------------------------------------------------------------------- + #package-global instance of the notmuch library + try: +- nmlib = CDLL("libnotmuch.so.3") ++ nmlib = CDLL(find_library("libnotmuch")) + except: + raise ImportError("Could not find shared 'notmuch' library.") + +-- +1.8.3 +