Skip to content

Commit 2f6cd71

Browse files
committed
build
1 parent 4ca4ad3 commit 2f6cd71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/pylib/build.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ fn main() {
1616
{
1717
let canonicalized_path = std::fs::canonicalize(real_path)
1818
.expect("failed to resolve RUSTPYTHONPATH during build time");
19-
println!(
20-
"cargo:rustc-env=win_lib_path={}",
21-
canonicalized_path.to_str().unwrap()
22-
);
19+
// Strip the extended path prefix (\\?\) that canonicalize adds on Windows
20+
let path_str = canonicalized_path.to_str().unwrap();
21+
let path_str = path_str.strip_prefix(r"\\?\").unwrap_or(path_str);
22+
println!("cargo:rustc-env=win_lib_path={}", path_str);
2323
}
2424
}
2525

0 commit comments

Comments
 (0)