delocate icon indicating copy to clipboard operation
delocate copied to clipboard

RFE: If library is in a `site-package` patch the `RPATH` to point to the installed file

Open LecrisUT opened this issue 1 year ago • 2 comments

Assuming that the packages are well packaged and tested between build-system.requires and dependencies, it would be more efficient to have the RPATH point to the original files that contain the library rather than create a copy of those as well.

LecrisUT avatar Mar 03 '25 16:03 LecrisUT

That would make linking against things like libarrow_python much easier. Though you can manually do that now by then --excludeing the dependencies (well, not really #207 )

assignUser avatar Mar 26 '25 14:03 assignUser

This idea makes a lot of sense, especially in the context of modern Python packaging workflows where dependencies are already well-isolated and verified. Allowing RPATH to point directly to the installed site-packaged library (rather than duplicating it) could reduce wheel bloat and simplify builds.... especially when working with larger compiled dependencies like libarrow_python, as mentioned.

That said, I agree there’s nuance here. I hope you can appreciate this...

A mechanism to opt-in or explicitly control this behavior (e.g. via a CLI flag like --link-site-package) would help avoid unintended side effects. Proper validation would be essential to ensure referenced libraries are portable and consistent across environments. Overall, this feels like a great enhancement opportunity ,.... potentially reducing duplication, improving compatibility, and streamlining builds.

HussainAther avatar Jun 01 '25 23:06 HussainAther