Package: olm / 2.2.2+git20170526.0fd768e+dfsg-1

lib-path-for-python Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Fixes library path for Python bindings
 Fixes the Python bindings to look in the right place for the library.

---

--- olm-2.2.2+git20170526.0fd768e+dfsg.orig/python/olm/_base.py
+++ olm-2.2.2+git20170526.0fd768e+dfsg/python/olm/_base.py
@@ -1,10 +1,11 @@
 import os.path
+import sysconfig
 
 from ctypes import *
 
 
 lib = cdll.LoadLibrary(os.path.join(
-    os.path.dirname(__file__), "..", "..", "build", "libolm.so.2")
+    "/usr/lib", sysconfig.get_config_var('MULTIARCH'), "libolm.so.2")
 )
 
 lib.olm_error.argtypes = []