diff options
| author | David Bremner <david@tethera.net> | 2015-03-07 08:31:14 +0100 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2015-03-08 08:30:36 +0100 |
| commit | aed5ec4350809aef34ae8290f8eda2069444b171 (patch) | |
| tree | 5b53b5c4b64f74fad1c182f0af9d9f24a3861d1f /bindings/python | |
| parent | a00b4abc27ee2402bfe0cf5c1cba5417ecc36097 (diff) | |
python: replace hardcoding of SONAME version
Failing to update this string in globals.py causes failures when the
SONAME changes. In order to hopefully reduce the number of such
errors, automate the process of setting the SONAME in the python
bindings.
Diffstat (limited to 'bindings/python')
| -rw-r--r-- | bindings/python/notmuch/globals.py | 5 | ||||
| -rw-r--r-- | bindings/python/notmuch/version.py | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py index 24b25d36..4c49d51d 100644 --- a/bindings/python/notmuch/globals.py +++ b/bindings/python/notmuch/globals.py @@ -18,15 +18,16 @@ Copyright 2010 Sebastian Spaeth <Sebastian@SSpaeth.de> """ from ctypes import CDLL, Structure, POINTER +from version import SOVERSION #----------------------------------------------------------------------------- #package-global instance of the notmuch library try: from os import uname if uname()[0] == 'Darwin': - nmlib = CDLL("libnotmuch.4.dylib") + nmlib = CDLL("libnotmuch.{0:s}.dylib".format(SOVERSION)) else: - nmlib = CDLL("libnotmuch.so.4") + nmlib = CDLL("libnotmuch.so.{0:s}".format(SOVERSION)) except: raise ImportError("Could not find shared 'notmuch' library.") diff --git a/bindings/python/notmuch/version.py b/bindings/python/notmuch/version.py index f719fdf4..35744d34 100644 --- a/bindings/python/notmuch/version.py +++ b/bindings/python/notmuch/version.py @@ -1,2 +1,3 @@ # this file should be kept in sync with ../../../version __VERSION__ = '0.19' +SOVERSION = '4' |
