Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle dlopened plugin library? #365

Open
kleag opened this issue Jan 6, 2022 · 1 comment
Open

How to handle dlopened plugin library? #365

kleag opened this issue Jan 6, 2022 · 1 comment
Labels

Comments

@kleag
Copy link

kleag commented Jan 6, 2022

Hi,
I noticed the first limitation stated in the README.rst of the project ("… dependencies that are loaded via those mechanisms will be missed"), but maybe can you point me to a correct solution…

I have a large C++ project based on Qt and boost. I was able to build it for manylinux_2_24 using scikit-build and PySide2 for the python binding. And auditwheel for installing all the libs it is linked with in the wheel of the package called aymara.

The last step I have to handle is the loading of its plugins that are not linked to the main libraries at build time but dlopened when needed. I'm able to copy the libs into the wheel but they stay in site-packages/aymara. Manually copying them to site-packages/aymara.libs make the loading at runtime work.

So, I have just to find how to correctly automatically deploy them in site-packages/aymara.libs but I am stuck there.

Any idea ?

@mayeut
Copy link
Member

mayeut commented Feb 20, 2022

If you can specify a folder from which plugins are loaded, I'd probably go down that road as it allows the grafting process to go through plugins as well.
e.g. copying plugins to aymara/plugins while building the wheel and use that folder as a source path for loading plugins.
Obviously, this might have drawbacks for local devs or locally built wheels and the heuristic to find the right source might not be as trivial as it sounds (if it's even doable in the first place).
You can also try to copy them directly to aymara.libs instead of aymara when building the wheel but I really don't know how auditwheel behaves in this case. Probably worth a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants