From c3a43cdff6ff95f4e65799b14d187d55609f23ab Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 15 Nov 2024 12:04:39 -0600 Subject: [PATCH 1/2] fix library-loading issues in editable installs --- .github/workflows/pr.yaml | 1 + python/libcuspatial/libcuspatial/load.py | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 3f6a68b8a..37e70e1db 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -169,4 +169,5 @@ jobs: build_command: | sccache -z; build-all -DBUILD_TESTS=ON -DBUILD_BENCHMARKS=ON --verbose; + python -c "import cuspatial; print(cuspatial.__version__)"; sccache -s; diff --git a/python/libcuspatial/libcuspatial/load.py b/python/libcuspatial/libcuspatial/load.py index 78a8590ef..977586669 100644 --- a/python/libcuspatial/libcuspatial/load.py +++ b/python/libcuspatial/libcuspatial/load.py @@ -81,11 +81,17 @@ def load_library(): # Prefer the libraries bundled in this package. If they aren't found # (which might be the case in builds where the library was prebuilt # before packaging the wheel), look for a system installation. - libcuspatial_lib = _load_wheel_installation(soname) - if libcuspatial_lib is None: - libcuspatial_lib = _load_system_installation(soname) + try: + libcuspatial_lib = _load_wheel_installation(soname) + if libcuspatial_lib is None: + libcuspatial_lib = _load_system_installation(soname) + except OSError: + # If none of the searches above succeed, just silently return None + # and rely on other mechanisms (like RPATHs on other DSOs) to + # help the loader find the library. + pass # The caller almost never needs to do anything with this library, but no # harm in offering the option since this object at least provides a handle - # to inspect where the libcuspatial was loaded from. + # to inspect where libcuspatial was loaded from. return libcuspatial_lib From 1d229f18a105da6b1518e953e6538db0831debdb Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 15 Nov 2024 12:19:45 -0600 Subject: [PATCH 2/2] remove smoke test --- .github/workflows/pr.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 37e70e1db..3f6a68b8a 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -169,5 +169,4 @@ jobs: build_command: | sccache -z; build-all -DBUILD_TESTS=ON -DBUILD_BENCHMARKS=ON --verbose; - python -c "import cuspatial; print(cuspatial.__version__)"; sccache -s;