Skip to content

Commit

Permalink
Fix build issue when no Python interpreters found on host
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed May 21, 2022
1 parent d39ab1a commit 9ea642b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/build_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,26 @@ pub fn find_interpreter(
}
} else {
println!("🐍 Not using a specific python interpreter");
Ok(interpreter)
if interpreter.is_empty() {
// Fake one to make `BuildContext::build_wheels` happy for abi3 when no cpython/pypy found on host
// The python interpreter config doesn't matter, as it's not used for anything
Ok(vec![PythonInterpreter {
config: InterpreterConfig {
major: *major as usize,
minor: *minor as usize,
interpreter_kind: InterpreterKind::CPython,
abiflags: "".to_string(),
ext_suffix: "".to_string(),
abi_tag: None,
pointer_width: None,
},
executable: PathBuf::new(),
platform: None,
runnable: false,
}])
} else {
Ok(interpreter)
}
}
}
}
Expand Down

0 comments on commit 9ea642b

Please sign in to comment.