auditwheel icon indicating copy to clipboard operation
auditwheel copied to clipboard

Support runtime-loaded libraries via setuptools Extension runtime_library_dirs argument?

Open SeanDS opened this issue 3 years ago • 0 comments

I know the README states that auditwheel is intended to handle only dependencies linked at compile time, not those loaded via e.g. dlopen, but setuptools supports a runtime_library_dirs argument to Extension that I think could be used to support runtime loaded libraries too.

As far as I understand, runtime_library_dirs is a list of directories containing shared objects loaded at runtime by the project's extensions. I think in principle it would be possible for auditwheel to copy any of the libraries in these paths that the project's extensions use into the wheel, then update their RPATHs.

I think name mangling would have to be disabled for such libraries, since runtime-loaded library names are hard-coded (i.e. calls to dlopen("mylibrary.so"); presumably can't be rewritten to dlopen("mylibrary-abcdef.so.0.0.1"); after compilation?).

Is there any reason why this wouldn't work?

(Kinda related to #365)

SeanDS avatar Mar 03 '22 11:03 SeanDS