Skip to content

Commit aa4e310

Browse files
committed
[Debug] Debug failures
Signed-off-by: Cristian Le <[email protected]>
1 parent e1ad807 commit aa4e310

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

src/scikit_build_core/repair_wheel/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ def _get_buildenv_platlib() -> str:
3737
real_purelib_path = DIR.parent.parent
3838
if real_purelib_path.samefile(purelib_path):
3939
# Here is the normal state if we are in a real venv
40+
logger.debug(
41+
"Used original platlib_path = {platlib_path}\n"
42+
"purelib_path = {purelib_path}\n"
43+
"real_purelib_path = {real_purelib_path}\n",
44+
platlib_path=platlib_path,
45+
purelib_path=purelib_path,
46+
real_purelib_path=real_purelib_path,
47+
)
4048
return platlib_path
4149
# Otherwise we need to trick it to giving us the real path
4250
data_path = sysconfig.get_path("data")
@@ -196,6 +204,11 @@ def get_library_dependencies(self, target: Target) -> list[Target]:
196204

197205
def repair_wheel(self) -> None:
198206
"""Repair the current wheel."""
207+
if self.builder.config.file_api:
208+
logger.debug("reply = {}", self.builder.config.file_api.reply)
209+
else:
210+
logger.error("No file-api")
211+
logger.debug("configuration = {}", self.configuration)
199212
for target in self.targets:
200213
if self._filter_targets:
201214
if target.type == "STATIC_LIBRARY":

src/scikit_build_core/repair_wheel/rpath.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ def get_package_rpaths(self, target: Target, install_path: Path) -> list[str]:
9191
# Skip empty rpaths. Most likely will have on at the end
9292
continue
9393
rpath = Path(rpath_str)
94+
logger.debug(
95+
"Trying to read link_command {link_part} -> {rpath}",
96+
link_part=link_part,
97+
rpath=rpath,
98+
)
9499
if not self.path_is_in_site_packages(rpath):
95100
# Skip any paths that cannot be handled. We do not check for paths in
96101
# the build directory, it should be covered by `get_dependency_rpaths`

tests/test_repair_wheel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def test_full_build(
5757
if backend == "pip":
5858
isolated.install(
5959
"-v",
60+
"--config-settings=logging.level=DEBUG",
6061
"./extern",
6162
".",
6263
isolated=with_isolation,
@@ -68,6 +69,7 @@ def test_full_build(
6869
isolated.module("build", *build_args, "./extern")
6970
else:
7071
build_args.append("--no-isolation")
72+
build_args.append("--config-setting=logging.level=DEBUG")
7173
isolated.module("build", *build_args, ".")
7274
wheels = list(dist.glob("*.whl"))
7375
isolated.install(*wheels)

0 commit comments

Comments
 (0)