20 lines
450 B
Diff
20 lines
450 B
Diff
|
--- python/olm/_base.py
|
||
|
+++ python/olm/_base.py
|
||
|
@@ -1,14 +1,13 @@
|
||
|
import os.path
|
||
|
|
||
|
from ctypes import *
|
||
|
+from ctypes import util
|
||
|
|
||
|
def read_random(n):
|
||
|
with open("/dev/urandom", "rb") as f:
|
||
|
return f.read(n)
|
||
|
|
||
|
-lib = cdll.LoadLibrary(os.path.join(
|
||
|
- os.path.dirname(__file__), "..", "..", "build", "libolm.so.2")
|
||
|
-)
|
||
|
+lib = cdll.LoadLibrary(util.find_library("olm"))
|
||
|
|
||
|
lib.olm_error.argtypes = []
|
||
|
lib.olm_error.restypes = c_size_t
|