From 601336f1f9ab57f44f6ab6b1d54fe5e6bef58a37 Mon Sep 17 00:00:00 2001 From: Roz K Date: Tue, 20 Sep 2022 02:47:07 +0200 Subject: [PATCH] Fix cdll loading path. --- __init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index a52f73b..8b64bf4 100644 --- a/__init__.py +++ b/__init__.py @@ -16,8 +16,9 @@ import ctypes import struct from array import array +from pathlib import Path -_lib = ctypes.cdll.LoadLibrary("./engine/engine.so") +_lib = ctypes.cdll.LoadLibrary(Path(__file__).parent / "engine.so") def _flag(x): return 1 << x