Skip to content

Commit

Permalink
Merge pull request #960 from messense/pypy-pyo3-python
Browse files Browse the repository at this point in the history
Set `PYO3_PYTHON` env var for PyPy when abi3 is enabled
  • Loading branch information
messense authored Jun 9, 2022
2 parents 4789767 + 6d827f0 commit f509ca8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Compare minimum python version requirement between `requires-python` and bindings crate in [#954](https://github.com/PyO3/maturin/pull/954)
* Add a `--target` option to `maturin list-python` command in [#957](https://github.com/PyO3/maturin/pull/957)
* Add support for using bundled python sysconfigs for PyPy when abi3 feature is enabled in [#958](https://github.com/PyO3/maturin/pull/958)
* Set `PYO3_PYTHON` env var for PyPy when abi3 is enabled in [#960](https://github.com/PyO3/maturin/pull/960)

## [0.12.19] - 2022-06-05

Expand Down
6 changes: 5 additions & 1 deletion src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ fn compile_target(
if let Some(interpreter) = python_interpreter {
// Target python interpreter isn't runnable when cross compiling
if interpreter.runnable {
if bindings_crate.is_bindings("pyo3") || bindings_crate.is_bindings("pyo3-ffi") {
if bindings_crate.is_bindings("pyo3")
|| bindings_crate.is_bindings("pyo3-ffi")
|| (matches!(bindings_crate, BridgeModel::BindingsAbi3(_, _))
&& matches!(interpreter.interpreter_kind, InterpreterKind::PyPy))
{
build_command.env("PYO3_PYTHON", &interpreter.executable);
}

Expand Down

0 comments on commit f509ca8

Please sign in to comment.