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
|
let mut sysconfig_paths = sysconfig_paths
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|p| {
|
.filter_map(|p| {
|
||||||
fs::canonicalize(p)
|
let canonical = fs::canonicalize(p).ok();
|
||||||
.ok()
|
match &sysconfig_name {
|
||||||
.filter(|p| p.file_stem() == sysconfig_name.as_deref())
|
Some(_) => canonical.filter(|p| p.file_stem() == sysconfig_name.as_deref()),
|
||||||
|
None => canonical,
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.collect::<Vec<PathBuf>>();
|
.collect::<Vec<PathBuf>>();
|
||||||
sysconfig_paths.dedup();
|
sysconfig_paths.dedup();
|
||||||
|
|
Loading…
Reference in a new issue