-
Notifications
You must be signed in to change notification settings - Fork 55
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
Helpers for handling RPATH and company #1002
Comments
We don't know the final bin path relative to anything else, that's handled by the installer after it makes the wheel. There's no mechanism in installers to communicate it as far as I know. It's usually related, but AFAIK you can actually completely customize where |
Not very related, though, I wonder if we can set variables so that |
Yeah, but we do know the paths relative inside the
Not sure how that would look like. The most annoying one to design for is windows. We could maybe solve the |
So progress report after experimenting a bit in https://github.com/LecrisUT/experiment-skbuild-wrapper. That one also shows the main dependency problem to resolve. I have almost all moving parts figured out, and probably with some
Hmm maybe another solution would be to integrate with |
The issue I am thinking of solving is to have a way to inject some
LD_LIBRARY_PATH
orPATH
so that it accounts for the path discrepancy of CMake installed files undersite_packages
andbin
/Scripts
location. I am considering two distinct cases hereLinking to dependencies
Writing the logic to create the appropriate RPATH for a dependency can be quite tricky, but maybe we can provide some helper functions. The key part is that within
scikit-build-core
we have better information of if a dependency is coming from the python dependencies, and what the relative paths between the root of the dependency and the final installation path includingwheel.install-dir
are.For the user interface, I was thinking of providing a CMake function to handle an imported target and append an appropriate
INSTALL_RPATH
. Here is a prototypeprototype
Probably
mocked_wheel_install_dir
would be passed as a cache variable?Patching current project being build
For python bindings, constructing the RPATH is not that difficult since it's just
$ORIGIN/${CMAKE_INSTALL_LIBDIR}
, and I am not sure how to provide a clean interface for this. Maybe having ascikit_build_install_python_module
helper? But then how do we get the current build's install path?The more difficult part would be
project.scripts
entry points for wrappers or compiled binaries, i.e. something likeHandling Window's PATH
WIP: No idea right now
The text was updated successfully, but these errors were encountered: