Skip to content

Commit 0c04b3d

Browse files
committed
[Debug] windows
Signed-off-by: Cristian Le <[email protected]>
1 parent 9f4a73a commit 0c04b3d

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

src/scikit_build_core/repair_wheel/windows.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,21 @@ def patch_target(self, target: Target) -> None:
3939
for artifact in target.artifacts
4040
if artifact.path.suffix == ".dll"
4141
)
42+
if target.install:
43+
logger.debug(
44+
"Target {} Install paths: {}",
45+
target.name,
46+
target.install.destinations,
47+
)
48+
else:
49+
logger.debug("Target {} has no install", target.name)
4250
# Loop over all install paths, until we get to RUNTIME destination
4351
for install_path in self.get_wheel_install_paths(target):
4452
dll_file = self.install_dir / install_path / dll_artifact
53+
logger.debug(
54+
"Trying path {dll_file}",
55+
dll_file=dll_file,
56+
)
4557
if not dll_file.exists():
4658
continue
4759
# Do the copy

tests/test_repair_wheel.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import os
12
import platform
23
import shutil
34
from pathlib import Path
45

56
import pytest
67

8+
from scikit_build_core._logging import rich_print
9+
710
DIR = Path(__file__).parent.resolve()
811
REPAIR_WHEEL = DIR / "packages/repair_wheel"
912

@@ -76,6 +79,30 @@ def test_full_build(
7679
wheels = list(dist.glob("*.whl"))
7780
isolated.install(*wheels)
7881

82+
# FIXME: Some debugging messages
83+
if platform.system() == "Windows":
84+
scripts_dir = isolated.executable.parent
85+
for root, _, files in os.walk(scripts_dir):
86+
root_path = Path(root)
87+
for file in files:
88+
path = root_path / file
89+
path = path.relative_to(scripts_dir)
90+
rich_print(f"scripts_path: {path}")
91+
base_project_dir = isolated.platlib / "base_project"
92+
for root, _, files in os.walk(base_project_dir):
93+
root_path = Path(root)
94+
for file in files:
95+
path = root_path / file
96+
path = path.relative_to(base_project_dir)
97+
rich_print(f"base_project_path: {path}")
98+
repair_project_dir = isolated.platlib / "repair_wheel"
99+
for root, _, files in os.walk(repair_project_dir):
100+
root_path = Path(root)
101+
for file in files:
102+
path = root_path / file
103+
path = path.relative_to(repair_project_dir)
104+
rich_print(f"repair_project_path: {path}")
105+
79106
if (
80107
platform.system() == "Linux"
81108
and "fc" in platform.release()

0 commit comments

Comments
 (0)