Replies: 2 comments 7 replies
-
Hi @sampotter, thanks for the question. This has come up multiple times before, so I guess it's really time we write some docs that address this use case. (TODO: https://mesonbuild.com/meson-python/explanations/internal-dependencies.html) First a few general pointers:
To say more, it'd be useful to know what exactly you're aiming for here:
And if (2) or (3): do you need it to work on Windows? And do you intend to distribute via PyPI, or only for users cloning your repo? |
Beta Was this translation helpful? Give feedback.
-
Hi @rgommers. Thanks for the speedy and very educational response. I truly appreciate it! I did see the linked stub in the documentation and assumed it would be pertinent. Re: your first general pointer: you can see the depth of my misunderstanding. :-) I had assumed that all Python-related functionality was captured by meson-python, but it's clear now that And thanks for the explanation regarding shared libraries. I have seen this come up enough times in other contexts that I figured it would be kind of nasty to resolve. If I could trouble you: do you have any recommendations for something to read about RPATHs? I'm not very familiar with them or how they work and they seem central to this business. To explain what I'm after:
Since I would like someone to be able to just Butterfly also depends on several other numerical libraries: OpenBLAS, ARPACK, UMFPACK, GSL, etc, which get picked up either using Meson's |
Beta Was this translation helpful? Give feedback.
-
I develop a numerical library in C called butterfly which is built using Meson and have more recently been using meson-python to build a thin wrapper for it written in Cython. By default, the C library is built as a shared library and the Python module just consumes this shared library as a dependency in the natural way in Meson. This has worked fine for testing when have I run scripts etc "locally" from
builddir
in the hackiest way possible.I've just recently tried running
meson install
to see whetherimport butterfly
will work. It doesn't. When I runmeson install
I see something like:So, the shared library and Python module seem to get put somewhere reasonable. But, when I fire up Python and try to import the shared library, it can't be found:
Any help would be appreciated.
I should say that I'm very green when it comes to packaging. I would like to make this work but it's not clear to me what tool in this complicated process is even responsible.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions