Skip to content

Commit

Permalink
Merge pull request #988 from messense/sysconfig-python
Browse files Browse the repository at this point in the history
Only lookup bundled Python sysconfig when interpreters aren't specified as file path
  • Loading branch information
messense authored Jun 26, 2022
2 parents d35f319 + 737cb1a commit bde6565
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Allow overriding platform release version using env var in [#975](https://github.com/PyO3/maturin/pull/975)
* Fix `maturin develop` for arm64 Python on M1 Mac when default toolchain is x86_64 in [#980](https://github.com/PyO3/maturin/pull/980)
* Add `--repository` option to `maturin upload` command in [#987](https://github.com/PyO3/maturin/pull/987)
* Only lookup bundled Python sysconfig when interpreters aren't specified as file path in [#988](https://github.com/PyO3/maturin/pull/988)

## [0.12.20] - 2022-06-15

Expand Down
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 bde6565

Please sign in to comment.