diff --git a/python/ionpy/Builder.py b/python/ionpy/Builder.py index 7b7ccfaf..05ad4177 100644 --- a/python/ionpy/Builder.py +++ b/python/ionpy/Builder.py @@ -1,7 +1,4 @@ import ctypes -from typing import Optional -from ctypes.util import find_library -import os from .native import ( c_ion_builder_t, @@ -20,6 +17,7 @@ ion_builder_run, ion_builder_run_with_port_map, + ) from .Node import Node @@ -49,10 +47,7 @@ def set_target(self, target: str) -> 'Builder': return self def with_bb_module(self, path: str) -> 'Builder': - if os.name == 'nt': - ret = ion_builder_with_bb_module(self.obj, str(find_library(path)).encode()) - else: - ret = ion_builder_with_bb_module(self.obj, path.encode()) + ret = ion_builder_with_bb_module(self.obj,path.encode()) if ret != 0: raise Exception('Invalid operation') diff --git a/python/ionpy/native.py b/python/ionpy/native.py index e6f0a84f..a551048f 100644 --- a/python/ionpy/native.py +++ b/python/ionpy/native.py @@ -1,13 +1,12 @@ import ctypes -from ctypes.util import find_library - import os import platform pre_built_path = os.path.join(os.path.dirname(__file__), 'module') if platform.system() == 'Windows': - ion_core_module = find_library('ion-core.dll') + ion_core_module = os.path.join(pre_built_path, 'windows/ion-core.dll') + ion_bb_module = os.path.join(pre_built_path, 'windows/ion-bb.dll') elif platform.system() == 'Darwin': ion_core_module = os.path.join(pre_built_path, 'macos/libion-core.dylib') ion_bb_module = os.path.join(pre_built_path, 'macos/libion-bb.dylib') @@ -19,8 +18,7 @@ # ion-core.dll must be in a directory listed in %PATH%. # libion-core.dylib must be in a directory listed in $DYLD_LIBRARY_PATH. ion_core = ctypes.cdll.LoadLibrary(ion_core_module) -if not platform.system() == 'Windows': - ion_bb = ctypes.cdll.LoadLibrary(ion_bb_module) +ion_bb = ctypes.cdll.LoadLibrary(ion_bb_module) class c_ion_type_t(ctypes.Structure): _fields_ = [ diff --git a/python/ionpy/version.py b/python/ionpy/version.py index 5b601886..e4adfb83 100644 --- a/python/ionpy/version.py +++ b/python/ionpy/version.py @@ -1 +1 @@ -__version__ = "1.5.0" +__version__ = "1.6.0"