At the moment the tests hard-code .so, but on OSX .dylib is the library extension and on Windows .dll is
import platform
from ctypes import *
# get the right filename
if platform.uname()[0] == "Windows":
name = "win.dll"
if platform.uname()[0] == "Linux":
name = "linux.so"
else:
name = "osx.dylib"
# load the library
lib = cdll.LoadLibrary(name)
Can probably add a utility function which appends the correct library extension, and use that in tests?
At the moment the tests hard-code
.so
, but on OSX.dylib
is the library extension and on Windows.dll
isCan probably add a utility function which appends the correct library extension, and use that in tests?