Skip to content

Commit 0ae8092

Browse files
committed
Sync upstream
1 parent 7794313 commit 0ae8092

File tree

7 files changed

+12
-8
lines changed

7 files changed

+12
-8
lines changed

LXST/Filters.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@
1616
ffi = FFI()
1717

1818
try:
19-
filterlib_spec = find_spec("LXST.filterlib")
20-
if not filterlib_spec or filterlib_spec.origin == None: raise ImportError("Could not locate pre-compiled LXST.filterlib module")
21-
with open(os.path.join(c_src_path, "Filters.h"), "r") as f: ffi.cdef(f.read())
22-
native_functions = ffi.dlopen(filterlib_spec.origin)
23-
USE_NATIVE_FILTERS = True
19+
# Disable native filterlib loading on Windows
20+
# for now due to strange linking behaviour,
21+
# but allow local compilation if the user has
22+
# a C compiler installed.
23+
if not RNS.vendor.platformutils.is_windows():
24+
filterlib_spec = find_spec("LXST.filterlib")
25+
if not filterlib_spec or filterlib_spec.origin == None: raise ImportError("Could not locate pre-compiled LXST.filterlib module")
26+
with open(os.path.join(c_src_path, "Filters.h"), "r") as f: ffi.cdef(f.read())
27+
native_functions = ffi.dlopen(filterlib_spec.origin)
28+
USE_NATIVE_FILTERS = True
2429

2530
except Exception as e:
2631
RNS.log(f"Could not load pre-compiled LXST filters library. The contained exception was: {e}", RNS.LOG_WARNING)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ build_wheel:
2424
python3 setup.py sdist bdist_wheel
2525
rm ./skip_extensions
2626
-@(rm ./LXST/*.so)
27-
-@(rm ./LXST/*.dll)
27+
-@(rm ./LXST/*.pyd)
2828

2929
native_libs:
3030
./march_build.sh
10 KB
Binary file not shown.
10 KB
Binary file not shown.
10 KB
Binary file not shown.
10 KB
Binary file not shown.

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@
3535
"Filters.h",
3636
"Filters.c",
3737
"filterlib*.so",
38-
"filterlib*.dll",
39-
"filterlib*.dylib",
38+
"filterlib*.pyd",
4039
]
4140
}
4241

0 commit comments

Comments
 (0)