diff --git a/Changelog.md b/Changelog.md index c3312e5d4..a0a44654a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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 diff --git a/src/compile.rs b/src/compile.rs index bf9e43e58..cdd655e4b 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -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); }