Skip to content

Commit

Permalink
Only lookup bundled Python sysconfig when interpreters aren't specified
Browse files Browse the repository at this point in the history
as file path
  • Loading branch information
messense committed Jun 26, 2022
1 parent d35f319 commit b167b59
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/build_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1083,10 +1083,7 @@ fn find_interpreter_in_sysconfig(
}
let mut interpreters = Vec::new();
for interp in interpreter {
let python = interp
.file_name()
.context("Invalid python interpreter")?
.to_string_lossy();
let python = interp.display().to_string();
let (python_impl, python_ver) = if let Some(ver) = python.strip_prefix("pypy") {
(InterpreterKind::PyPy, ver.strip_prefix('-').unwrap_or(ver))
} else if let Some(ver) = python.strip_prefix("python") {
Expand Down

0 comments on commit b167b59

Please sign in to comment.