From 27a43e5943b0f268ffd4b47516faae3086fe3627 Mon Sep 17 00:00:00 2001 From: _ <_> Date: Fri, 18 May 2018 16:49:06 -0700 Subject: [PATCH] Removed path manipulations for single absolute path to build location of .so --- bindings/__init__.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bindings/__init__.py b/bindings/__init__.py index ee86a27..75322a0 100644 --- a/bindings/__init__.py +++ b/bindings/__init__.py @@ -1,13 +1,18 @@ import ctypes, os, sys def loadlibc(): - sharedlib = './lib3ddevil1.so' libc = None - os.environ['PATH'] = os.path.abspath( - os.path.join( - os.path.dirname(__file__), "../")) \ - + ';' \ - + os.environ['PATH'] +# os.environ['PATH'] = os.path.abspath( +# os.path.join( +# os.path.dirname(__file__), "../")) \ +# + ';' \ +# + os.environ['PATH'] + # __file__ is this __init__.py + # This assumes that the repo's directory has not been modified + # and that + so = '/lib3ddevil1.so' + libdir = os.path.abspath(os.path.join(os.path.dirname(__file__), "../")) + sharedlib = libdir + so try: libc = ctypes.cdll.LoadLibrary(sharedlib) except OSError as e: