Skip to content

Commit 3b26c7e

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 f428b0d commit 3b26c7e

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
@@ -7,6 +7,7 @@
77
import dataclasses
88
from typing import TYPE_CHECKING
99

10+
from .._shutil import Run
1011
from .rpath import RpathWheelRepairer
1112

1213
if TYPE_CHECKING:
@@ -38,9 +39,8 @@ def get_library_rpath(self, artifact: Path) -> list[str]:
3839
]
3940

4041
def patch_library_rpath(self, artifact: Path, rpaths: list[str]) -> None:
41-
from auditwheel.patcher import Patchelf
42-
4342
final_rpaths = set(rpaths)
4443
if final_rpaths:
45-
patcher = Patchelf()
46-
patcher.set_rpath(artifact, ":".join(final_rpaths))
44+
run = Run()
45+
run.live("patchelf", "--remove-rpath", artifact)
46+
run.live("patchelf", "--set-rpath", ":".join(final_rpaths), artifact)

0 commit comments

Comments
 (0)