From 03f01f5a866133e873124d9a22afc059d9d85063 Mon Sep 17 00:00:00 2001 From: messense Date: Fri, 17 Feb 2023 12:21:05 +0800 Subject: [PATCH] Use default `ext_suffix` for Emscripten target if not provided in `PYO3_CONFIG_FILE` --- Changelog.md | 1 + src/python_interpreter/config.rs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Changelog.md b/Changelog.md index e3e928bcd..03174967f 100644 --- a/Changelog.md +++ b/Changelog.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Add support for custom TLS certificate authority bundle in [#1483](https://github.com/PyO3/maturin/pull/1483) * Add support for Emscripten in `generate-ci` command in [#1484](https://github.com/PyO3/maturin/pull/1484) * Add support for linking with pyo3 in abi3 debug mode on Windows in [#1487](https://github.com/PyO3/maturin/pull/1487) +* Use default `ext_suffix` for Emscripten target if not provided in `PYO3_CONFIG_FILE` in [#1491](https://github.com/PyO3/maturin/pull/1491) ## [0.14.13] - 2023-02-12 diff --git a/src/python_interpreter/config.rs b/src/python_interpreter/config.rs index 4473f7e8e..feec2848a 100644 --- a/src/python_interpreter/config.rs +++ b/src/python_interpreter/config.rs @@ -198,6 +198,16 @@ impl InterpreterConfig { ) }), } + } else if target.is_emscripten() && matches!(interpreter_kind, InterpreterKind::CPython) { + ext_suffix.unwrap_or_else(|| { + format!( + ".cpython-{}-{}-{}.{}", + abi_tag, + target.get_python_arch(), + target.get_python_os(), + file_ext + ) + }) } else { ext_suffix.context("missing value for ext_suffix")? };