Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
pylib strip path
  • Loading branch information
youknowone committed Dec 11, 2025
commit 32f2d415837a5872f32b280b7a60d1c24131dfb5
8 changes: 4 additions & 4 deletions crates/pylib/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ fn main() {
{
let canonicalized_path = std::fs::canonicalize(real_path)
.expect("failed to resolve RUSTPYTHONPATH during build time");
println!(
"cargo:rustc-env=win_lib_path={}",
canonicalized_path.to_str().unwrap()
);
// Strip the extended path prefix (\\?\) that canonicalize adds on Windows
let path_str = canonicalized_path.to_str().unwrap();
let path_str = path_str.strip_prefix(r"\\?\").unwrap_or(path_str);
println!("cargo:rustc-env=win_lib_path={path_str}");
}
}

Expand Down