Skip to content

Commit cee4b16

Browse files
committed
Correct relative paths in patchelf --set-rpath
1 parent d83bb42 commit cee4b16

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cibuildwheel/platforms/android.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import subprocess
99
from collections.abc import Iterable, Iterator
1010
from dataclasses import dataclass
11+
from os.path import relpath
1112
from pathlib import Path
1213
from pprint import pprint
1314
from runpy import run_path
@@ -513,7 +514,7 @@ def repair_default(
513514
call(
514515
"patchelf",
515516
"--set-rpath",
516-
f"${{ORIGIN}}/{libs_dir.relative_to(path.parent)}",
517+
f"${{ORIGIN}}/{relpath(libs_dir, path.parent)}",
517518
path,
518519
)
519520
call("wheel", "pack", unpacked_dir, "-d", repaired_wheel_dir)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ dependencies = [
4545
"filelock",
4646
"humanize",
4747
"packaging>=20.9",
48-
"pyelftools>=0.29",
4948
"platformdirs",
49+
"pyelftools>=0.29",
5050
"wheel>=0.33.6",
5151
]
5252

0 commit comments

Comments
 (0)