Try loading dylib's too

This commit is contained in:
2025-05-27 11:51:55 -04:00
parent 7a3eb61868
commit b0dd034be8

View File

@@ -70,11 +70,13 @@ class WeaselJsonParser:
self._lib = None self._lib = None
if build_dir is None: if build_dir is None:
build_dir = os.path.dirname(__file__) + "/build" build_dir = os.path.dirname(__file__) + "/build"
for f in (build_dir + "/" + "libweaseljson.so",): for f in (
build_dir + "/" + "libweaseljson.so",
build_dir + "/" + "libweaseljson.dylib",
):
try: try:
self._lib = ctypes.cdll.LoadLibrary(f) self._lib = ctypes.cdll.LoadLibrary(f)
except OSError: except OSError:
print("Could not load " + f)
pass pass
if self._lib is None: if self._lib is None: