Sync upstream

This commit is contained in:
Mark Qvist 2025-11-24 18:08:02 +01:00
commit 0ae8092914
7 changed files with 12 additions and 8 deletions

View file

@ -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)

View file

@ -24,7 +24,7 @@ build_wheel:
python3 setup.py sdist bdist_wheel
rm ./skip_extensions
-@(rm ./LXST/*.so)
-@(rm ./LXST/*.dll)
-@(rm ./LXST/*.pyd)
native_libs:
./march_build.sh

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -35,8 +35,7 @@ package_data = {
"Filters.h",
"Filters.c",
"filterlib*.so",
"filterlib*.dll",
"filterlib*.dylib",
"filterlib*.pyd",
]
}