Package module with shared libraries

I’m using pybind11 in the project piper-phonemize-fork which has 2 shared libraries dependencies (onnxruntime and espeak-ng).
I can’t import the extension because it doesn’t find the 2 shared libraries which I included in the package.
Even when modifying LD_LIBRARY_PATH on Linux and or DYLD_LIBRARY_PATH on macOS or PATH on Windows.
It just says that it can’t find the extension but the issue is that the extension fail to load the shared libraries.
It can import ONLY if the extension and the shared libraries are placed in the same folder, but for some reason the extension file is placed in site-pacakges rather than the package folder.

People use auditwheel or delocate or cibuildwheel or delvewheel
While these tools can sometimes simplify, I prefer not to use them in simple projects.

Is there a simple way to include the extension + the shared libraries in the package folder and load them successfully on Linux, Windows, and macOS?

Is there a simple way to include the extension + the shared libraries in the package folder and load them successfully on Linux, Windows, and macOS?

I don’t think so.

If you want a cross-platform solution for python packages with C dependencies, maybe you’re looking for conda? It looks like onnxruntime is already packaged for conda-forge, so you would need to figure out how to package espeak-ng on conda-forge for the platforms you care about, but then you could just conda install both of them.

I prefer not to use Conda.
I’m wondering, where’s the gap, why it’s not simple as copying the shared libraries in the build time and make them available at runtime in init.py?