Skip to content

Commit

Permalink
Use default ext_suffix for Emscripten target if not provided in `PY…
Browse files Browse the repository at this point in the history
…O3_CONFIG_FILE`
  • Loading branch information
messense committed Feb 17, 2023
1 parent d4726f2 commit 03f01f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions src/python_interpreter/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")?
};
Expand Down

0 comments on commit 03f01f5

Please sign in to comment.