Update build.rs
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
This commit is contained in:
parent
884cd9d726
commit
9199c78e1b
8
build.rs
8
build.rs
|
@ -401,9 +401,11 @@ fn find_sysconfigdata(cross: &CrossCompileConfig) -> Result<PathBuf> {
|
|||
let mut sysconfig_paths = sysconfig_paths
|
||||
.iter()
|
||||
.filter_map(|p| {
|
||||
fs::canonicalize(p)
|
||||
.ok()
|
||||
.filter(|p| p.file_stem() == sysconfig_name.as_deref())
|
||||
let canonical = fs::canonicalize(p).ok();
|
||||
match &sysconfig_name {
|
||||
Some(_) => canonical.filter(|p| p.file_stem() == sysconfig_name.as_deref()),
|
||||
None => canonical,
|
||||
}
|
||||
})
|
||||
.collect::<Vec<PathBuf>>();
|
||||
sysconfig_paths.dedup();
|
||||
|
|
Loading…
Reference in a new issue