DOI-USGS / knoten

Python Geospatial Sensor Exploitation Library
Other
3 stars 21 forks source link

Update library path for USGSCSM2.0.0 #118

Closed chkim-usgs closed 2 months ago

chkim-usgs commented 8 months ago

USGSCSM 2.0.0 library installation path has change: https://github.com/DOI-USGS/usgscsm/blob/main/CMakeLists.txt#L116

An example of this change is IsisPreferences updating the plugins path: https://github.com/DOI-USGS/ISIS3/blob/dev/isis/IsisPreferences#L181

Need to update USGSCSM's library path.

jlaura commented 7 months ago

A change is also needed in the __init__ where find_library is called. Specifically:

$ python -c 'from ctypes.util import find_library; print(find_library("usgscsm"))'
None
$ ln -s $CONDA_PREFIX/lib/csmplugins/libusgscsm.so $CONDA_PREFIX/lib/libusgscsm.so
$ python -c 'from ctypes.util import find_library; print(find_library("usgscsm"))'
/caldera/hovenweep/projects/usgs/css/astro/apps/miniforge3/envs/autocnet1.1.0/lib/libusgscsm.so

It looks like find_library does not search the new sub-directory for the lib and then fails to load the plugin on import. I do not see any option in the docs to add a path hint to find library. I also do not have a non-tacky solution at this time.

This is knoten v0.2.1 and usgscsm v2.0.1.

acpaquette commented 5 months ago

@jlaura With the PR that went into knoten is this resolved?

jlaura commented 5 months ago

For mac and linux yes. I did not see a windows one land, but perhaps it did? I'm happy to close if @Kelvinrr +1s a windows update.

Kelvinrr commented 2 months ago

Windows was a pain to support with knoten, I would suggest people to use WSL. I'll make a README update