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

[WIP] feat: Integrate wheel repairer #1009

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

LecrisUT
Copy link
Collaborator

@LecrisUT LecrisUT commented Mar 4, 2025

The goal of this is:

  • Get the linked libraries from the configure step
  • Check if the paths start with the current build environment's sysconfig.get_path("platlib")
  • If so patch the RPATH to be relative paths. (Remove any hard-coded RPATHS, due to CMAKE_INSTALL_RPATH_USE_LINK_PATH)
  • Patch the RPATHs of the current wheel files
  • For windows systems, add dlls to Scripts path
  • Do some other magic that delvewheel does

Still working on the logic for this, but there are a few questions that could be explored in the meantime.

To discuss:

  • Should this be separated as a standalone plugin and instead expose an entry-point scikit-build.repair-wheel?
  • Initially I was considering using auditwheel/delocate/delvewheel directly, but these do not handle differently the packages in site-package vs external
  • Do we extend the interface to pick up system packages as well? I was thinking that the repairwheel trio can do all the hard work generally, but maybe the user needs more nuanced configuration, e.g. with Qt/PySide the requirement is to bundle the Qt framework uniquely, compared to dlevewheel which creates separate dlls for each wheel.
  • Naive binary wrappers (e.g. tests/packages/repair_wheel/python/repair_wheel/__main__.py) can still fail because the PATH is not propagated
  • Windows patching might be tricky for the compiled python module

LecrisUT added 6 commits March 4, 2025 17:06
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
Signed-off-by: Cristian Le <git@lecris.dev>
@LecrisUT LecrisUT force-pushed the feat/repair-wheel branch from 292f8ef to fba8ae0 Compare March 4, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant