Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix abi3 wheel build issue when no Python interpreters found on host #933

Merged
merged 1 commit into from
May 21, 2022
Merged
Changes from all commits
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
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