void-packages/srcpkgs/olm/patches/python-find-olm.patch
2018-06-27 20:30:08 -03:00

19 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