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.
.PHONY: update-versions
update-versions:
- sed -i "s/^__VERSION__[[:blank:]]*=.*$$/__VERSION__ = \'${VERSION}\'/" $(PV_FILE)
+ sed -i -e "s/^__VERSION__[[:blank:]]*=.*$$/__VERSION__ = \'${VERSION}\'/" \
+ -e "s/^SOVERSION[[:blank:]]*=.*$$/SOVERSION = \'${LIBNOTMUCH_VERSION_MAJOR}\'/" \
+ ${PV_FILE}
# We invoke make recursively only to force ordering of our phony
# targets in the case of parallel invocation of make (-j).
"""
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.")
# this file should be kept in sync with ../../../version
__VERSION__ = '0.19'
+SOVERSION = '4'