mirror of
https://github.com/markqvist/LXST.git
synced 2026-04-27 22:25:41 +00:00
Sync upstream
This commit is contained in:
parent
7794313202
commit
0ae8092914
7 changed files with 12 additions and 8 deletions
|
|
@ -16,11 +16,16 @@ else:
|
|||
ffi = FFI()
|
||||
|
||||
try:
|
||||
filterlib_spec = find_spec("LXST.filterlib")
|
||||
if not filterlib_spec or filterlib_spec.origin == None: raise ImportError("Could not locate pre-compiled LXST.filterlib module")
|
||||
with open(os.path.join(c_src_path, "Filters.h"), "r") as f: ffi.cdef(f.read())
|
||||
native_functions = ffi.dlopen(filterlib_spec.origin)
|
||||
USE_NATIVE_FILTERS = True
|
||||
# Disable native filterlib loading on Windows
|
||||
# for now due to strange linking behaviour,
|
||||
# but allow local compilation if the user has
|
||||
# a C compiler installed.
|
||||
if not RNS.vendor.platformutils.is_windows():
|
||||
filterlib_spec = find_spec("LXST.filterlib")
|
||||
if not filterlib_spec or filterlib_spec.origin == None: raise ImportError("Could not locate pre-compiled LXST.filterlib module")
|
||||
with open(os.path.join(c_src_path, "Filters.h"), "r") as f: ffi.cdef(f.read())
|
||||
native_functions = ffi.dlopen(filterlib_spec.origin)
|
||||
USE_NATIVE_FILTERS = True
|
||||
|
||||
except Exception as e:
|
||||
RNS.log(f"Could not load pre-compiled LXST filters library. The contained exception was: {e}", RNS.LOG_WARNING)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue