Skip to content

Commit 0e94c34

Browse files
committed
[DEBUG] Add some more debug options
Signed-off-by: Cristian Le <[email protected]>
1 parent 03324a0 commit 0e94c34

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

src/scikit_build_core/repair_wheel/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ def get_wheel_repairer(
206206
wheel_dirs=wheel_dirs,
207207
)
208208

209+
logger.debug(
210+
"wheel_dirs[platlib] = {platlib}\n"
211+
"sysconfig.get_path(platlib) = {sysconfig_path}\n"
212+
"install_dir = {install_dir}\n",
213+
platlib=wheel_dirs["platlib"],
214+
sysconfig_path=sysconfig.get_path("platlib"),
215+
install_dir=install_dir,
216+
)
209217
WheelRepairer.initialize()
210218
if not (
211219
repairer_cls := WheelRepairer._platform_repairers.get(platform.system())

src/scikit_build_core/repair_wheel/linux.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ def patch_linux_library_rpath(self, artifact: Path, rpaths: list[str]) -> None:
5454
# Merge with all the rpaths we were given
5555
final_rpaths = final_rpaths.union(rpaths)
5656
patcher = Patchelf()
57+
logger.debug(
58+
"Setting RPATH for {artifact} to: {rpath}",
59+
artifact=artifact,
60+
rpath=final_rpaths,
61+
)
5762
patcher.set_rpath(artifact, ":".join(final_rpaths))
5863

5964
def get_dependency_rpaths(self, target: Target, install_path: Path) -> list[str]:
@@ -123,10 +128,11 @@ def get_package_rpaths(self, target: Target, install_path: Path) -> list[str]:
123128
rpath = self.path_relative_site_packages(rpath, install_path)
124129
new_rpath_str = f"$ORIGIN/{rpath.parent}"
125130
rpaths.append(new_rpath_str)
126-
except Exception:
131+
except Exception as exc:
127132
logger.warning(
128-
"Could not parse link-library as a path: {fragment}",
133+
"Could not parse link-library as a path: {fragment}\nexc = {exc}",
129134
fragment=link_command.fragment,
135+
exc=exc,
130136
)
131137
continue
132138
return rpaths

tests/test_repair_wheel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ def test_full_build(isolated, isolate, manual_repair, monkeypatch):
3535
isolated.install("delvewheel")
3636
isolated.install("./extern", isolated=isolate)
3737

38-
isolated.install("-v", "./extern", ".", isolated=isolate)
38+
isolated.install(
39+
"-v", "--config-settings=logging.level=DEBUG", "./extern", ".", isolated=isolate
40+
)
3941

4042
isolated.run("main")
4143
isolated.module("repair_wheel")

0 commit comments

Comments
 (0)