Skip to content

Commit 8c1d087

Browse files
committed
Run pachelf directly
`auditwheel` pacher forces `DT_RPATH`. Here instead we use `DT_RUNPATH` so that it can be overwritten by the user Signed-off-by: Cristian Le <git@lecris.dev>
1 parent 202ddb8 commit 8c1d087

File tree

1 file changed

+4
-4
lines changed
  • src/scikit_build_core/repair_wheel

1 file changed

+4
-4
lines changed

src/scikit_build_core/repair_wheel/linux.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from typing import TYPE_CHECKING
88

9+
from .._shutil import Run
910
from .rpath import RpathWheelRepairer
1011

1112
if TYPE_CHECKING:
@@ -36,9 +37,8 @@ def get_library_rpath(self, artifact: Path) -> list[str]:
3637
]
3738

3839
def patch_library_rpath(self, artifact: Path, rpaths: list[str]) -> None:
39-
from auditwheel.patcher import Patchelf
40-
4140
final_rpaths = set(rpaths)
4241
if final_rpaths:
43-
patcher = Patchelf()
44-
patcher.set_rpath(artifact, ":".join(final_rpaths))
42+
run = Run()
43+
run.live("patchelf", "--remove-rpath", artifact)
44+
run.live("patchelf", "--set-rpath", ":".join(final_rpaths), artifact)

0 commit comments

Comments
 (0)