Skip to content

Best practices in linking against a conda-packaged library #561

Answered by rgommers
akhmerov asked this question in Q&A
Discussion options

You must be logged in to vote

I just tried, and things build fine with your package as is for me, as well as with this diff (which is what I'd propose as a cleanup):

diff --git a/meson.build b/meson.build
index 1a29cb5..dac5f59 100644
--- a/meson.build
+++ b/meson.build
@@ -39,19 +39,11 @@ inc_np = include_directories(incdir_numpy)
 np_dep = declare_dependency(include_directories: inc_np)
 mumps_names = get_option('mumps_names')

-# Use python's ctypes.util.find_library to find the library
-# Works for conda and Debian/Ubuntu
-mumps_lib_path = fs.parent(run_command(py,
-    [
-    '-c',
-    'import ctypes.util; print(ctypes.util.find_library("@0@"))'.format(mumps_names[0])
-    ],
-    check: true
-).stdout().strip())
-

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@akhmerov
Comment options

@rgommers
Comment options

Answer selected by akhmerov
@akhmerov
Comment options

@rgommers
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants