From eeae6c3773dc178073a0fc511bb182dbfc83ba17 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Thu, 26 Aug 2021 12:06:55 -0500 Subject: [PATCH] dll path is src dir path --- bindings/generated/pixie.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bindings/generated/pixie.py b/bindings/generated/pixie.py index 0523cda..c24fc70 100644 --- a/bindings/generated/pixie.py +++ b/bindings/generated/pixie.py @@ -1,6 +1,17 @@ from ctypes import * +import os, sys +from pathlib import Path -dll = cdll.LoadLibrary("pixie.dll") +src_path = Path(__file__).resolve() +src_dir = str(src_path.parent) + +if sys.platform == "win32": + dllPath = src_dir + "/pixie.dll" +elif sys.platform == "darwin": + dllPath = src_dir + "/libpixie.dylib" +else: + dllPath = src_dir + "/libpixie.so" +dll = cdll.LoadLibrary(dllPath) class PixieError(Exception): pass