File: lib-path-for-python

package info (click to toggle)
olm 2.2.2%2Bgit20170526.0fd768e%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 2,040 kB
  • ctags: 1,713
  • sloc: ansic: 10,149; cpp: 7,345; java: 2,540; objc: 1,341; python: 1,205; makefile: 236; sh: 160; xml: 10; asm: 7
file content (20 lines) | stat: -rw-r--r-- 543 bytes parent folder | 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 = []