Files
MINGW-packages/mingw-w64-python-rtree/0001-fix-mingw-finder.patch
2025-07-08 09:10:37 +02:00

24 lines
839 B
Diff

--- a/rtree/finder.py
+++ b/rtree/finder.py
@@ -34,7 +34,10 @@
arch = "64"
else:
arch = "32"
- lib_name = f"spatialindex_c-{arch}.dll"
+ if "MSC" in sys.version:
+ lib_name = f"spatialindex_c-{arch}.dll"
+ else:
+ lib_name = "libspatialindex_c-8.dll"
# add search paths for conda installs
if (_sys_prefix / "conda-meta").exists() or "conda" in sys.version:
@@ -50,7 +53,7 @@
# so Windows can find additional DLL dependencies.
os.environ["PATH"] = ";".join([str(path), oldenv])
try:
- rt = ctypes.cdll.LoadLibrary(str(path / lib_name))
+ rt = ctypes.cdll.LoadLibrary(lib_name)
if rt is not None:
return rt
except OSError: