1 Return-Path: <tomi.ollila@iki.fi>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 18777431FBC
\r
6 for <notmuch@notmuchmail.org>; Sat, 7 Mar 2015 02:42:49 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5
\r
12 tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id WZ31Lof6v7Wc for <notmuch@notmuchmail.org>;
\r
16 Sat, 7 Mar 2015 02:42:45 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id C0145431FAE
\r
19 for <notmuch@notmuchmail.org>; Sat, 7 Mar 2015 02:42:45 -0800 (PST)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 46C8E1000F3;
\r
22 Sat, 7 Mar 2015 12:42:24 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH] python: replace hardcoding of SONAME version
\r
26 In-Reply-To: <1425713474-8344-1-git-send-email-david@tethera.net>
\r
27 References: <1425713474-8344-1-git-send-email-david@tethera.net>
\r
28 User-Agent: Notmuch/0.19+53~gb45d2f9 (http://notmuchmail.org) Emacs/24.3.1
\r
29 (x86_64-unknown-linux-gnu)
\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
31 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
32 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
33 Date: Sat, 07 Mar 2015 12:42:23 +0200
\r
34 Message-ID: <m2a8zpqeb4.fsf@guru.guru-group.fi>
\r
36 Content-Type: text/plain
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Sat, 07 Mar 2015 10:42:49 -0000
\r
51 On Sat, Mar 07 2015, David Bremner <david@tethera.net> wrote:
\r
53 > Failing to update this string in globals.py causes failures when the
\r
54 > SONAME changes. In order to hopefully reduce the number of such
\r
55 > errors, automate the process of setting the SONAME in the python
\r
58 Looks sensible me -- anyone knowing more how 'pythonic' the variable
\r
59 convention used is (i.e. is plain SOVERSION -- or any other issues) good?
\r
65 > Makefile.local | 4 +++-
\r
66 > bindings/python/notmuch/globals.py | 5 +++--
\r
67 > bindings/python/notmuch/version.py | 1 +
\r
68 > 3 files changed, 7 insertions(+), 3 deletions(-)
\r
70 > After hitting the mismatch again while working on the count API, I
\r
71 > decided to try to fix it.
\r
73 > diff --git a/Makefile.local b/Makefile.local
\r
74 > index 81ee347..6d54742 100644
\r
75 > --- a/Makefile.local
\r
76 > +++ b/Makefile.local
\r
77 > @@ -107,7 +107,9 @@ dist: $(TAR_FILE)
\r
78 > .PHONY: update-versions
\r
81 > - sed -i "s/^__VERSION__[[:blank:]]*=.*$$/__VERSION__ = \'${VERSION}\'/" $(PV_FILE)
\r
82 > + sed -i -e "s/^__VERSION__[[:blank:]]*=.*$$/__VERSION__ = \'${VERSION}\'/" \
\r
83 > + -e "s/^SOVERSION[[:blank:]]*=.*$$/SOVERSION = \'${LIBNOTMUCH_VERSION_MAJOR}\'/" \
\r
86 > # We invoke make recursively only to force ordering of our phony
\r
87 > # targets in the case of parallel invocation of make (-j).
\r
88 > diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py
\r
89 > index 24b25d3..4c49d51 100644
\r
90 > --- a/bindings/python/notmuch/globals.py
\r
91 > +++ b/bindings/python/notmuch/globals.py
\r
92 > @@ -18,15 +18,16 @@ Copyright 2010 Sebastian Spaeth <Sebastian@SSpaeth.de>
\r
95 > from ctypes import CDLL, Structure, POINTER
\r
96 > +from version import SOVERSION
\r
98 > #-----------------------------------------------------------------------------
\r
99 > #package-global instance of the notmuch library
\r
101 > from os import uname
\r
102 > if uname()[0] == 'Darwin':
\r
103 > - nmlib = CDLL("libnotmuch.4.dylib")
\r
104 > + nmlib = CDLL("libnotmuch.{0:s}.dylib".format(SOVERSION))
\r
106 > - nmlib = CDLL("libnotmuch.so.4")
\r
107 > + nmlib = CDLL("libnotmuch.so.{0:s}".format(SOVERSION))
\r
109 > raise ImportError("Could not find shared 'notmuch' library.")
\r
111 > diff --git a/bindings/python/notmuch/version.py b/bindings/python/notmuch/version.py
\r
112 > index f719fdf..35744d3 100644
\r
113 > --- a/bindings/python/notmuch/version.py
\r
114 > +++ b/bindings/python/notmuch/version.py
\r
116 > # this file should be kept in sync with ../../../version
\r
117 > __VERSION__ = '0.19'
\r
122 > _______________________________________________
\r
123 > notmuch mailing list
\r
124 > notmuch@notmuchmail.org
\r
125 > http://notmuchmail.org/mailman/listinfo/notmuch
\r