I want to build two related conda packages:
- A shared object file
libfoo.so
with compiled code - A Python wrapper around that code,
foopy
Upon import, the foopy
module needs to locate the libfoo.so
file, which it will then use with ctypes:
so_directory = ???
lib = ctypes.cdll.LoadLibrary(os.path.join(so_directory, 'libfoo.so'))
How do I reliably find where the libfoo.so
file is located? I'm happy to change either recipe.