Fix Python library loading
This commit is contained in:
parent
0a67ec92ec
commit
385975b88f
|
@ -1,5 +1,7 @@
|
|||
/Cargo.lock
|
||||
/target/
|
||||
|
||||
__pycache__/
|
||||
/venv/
|
||||
|
||||
# Ignore locally built native modules.
|
||||
|
|
|
@ -23,8 +23,9 @@ def _load_native_module():
|
|||
os_arch = "unknown"
|
||||
|
||||
this_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0]))
|
||||
pyv = sys.version_info
|
||||
sys.path.insert(0, this_folder)
|
||||
module = importlib.import_module(''.join([os_name, "-", os_arch, '-', sys.version_info.major, '_', sys.version_info.minor, ".hyperbuild"]))
|
||||
module = importlib.import_module(''.join([os_name, "-", os_arch, '-', str(pyv.major), '_', str(pyv.minor), ".hyperbuild"]))
|
||||
sys.path.pop(0)
|
||||
return module
|
||||
|
||||
|
|
Loading…
Reference in New Issue