Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prefer wheel-provided libcuspatial.so in load_library(), use RTLD_LOCAL #1483

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
try only searching lib64
jameslamb committed Nov 14, 2024
commit b484ffde00580cb6540b6eaefcb3b3dd14612124
13 changes: 5 additions & 8 deletions python/libcuspatial/libcuspatial/load.py
Original file line number Diff line number Diff line change
@@ -38,14 +38,11 @@ def _load_wheel_installation(soname: str):

Returns ``None`` if the library cannot be loaded.
"""
out = None
for lib_dir in ("lib", "lib64"):
if os.path.isfile(
lib := os.path.join(os.path.dirname(__file__), lib_dir, soname)
):
out = ctypes.CDLL(lib, PREFERRED_LOAD_FLAG)
break
return out
if os.path.isfile(
lib := os.path.join(os.path.dirname(__file__), "lib64", soname)
):
return ctypes.CDLL(lib, PREFERRED_LOAD_FLAG)
return None


def load_library():