We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ca4ad3 commit 2f6cd71Copy full SHA for 2f6cd71
crates/pylib/build.rs
@@ -16,10 +16,10 @@ fn main() {
16
{
17
let canonicalized_path = std::fs::canonicalize(real_path)
18
.expect("failed to resolve RUSTPYTHONPATH during build time");
19
- println!(
20
- "cargo:rustc-env=win_lib_path={}",
21
- canonicalized_path.to_str().unwrap()
22
- );
+ // 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);
23
}
24
25
0 commit comments