From 2325c283b0180eaacc65190191c122f6282f524b Mon Sep 17 00:00:00 2001 From: messense Date: Mon, 15 Nov 2021 13:57:47 +0800 Subject: [PATCH] Fix mingw platform detection --- CHANGELOG.md | 1 + pyo3-build-config/src/impl_.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4e86580dd0..bac059e64b2 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 ### Fixed - Fix creating `#[classattr]` by functions with the name of a known magic method. [#1969](https://github.com/PyO3/pyo3/pull/1969) +- Fix mingw platform detection. [#1993](https://github.com/PyO3/pyo3/pull/1993) ## [0.15.0] - 2021-11-03 diff --git a/pyo3-build-config/src/impl_.rs b/pyo3-build-config/src/impl_.rs index 4690b6e70ba..aaf2f3c9753 100644 --- a/pyo3-build-config/src/impl_.rs +++ b/pyo3-build-config/src/impl_.rs @@ -202,7 +202,7 @@ print_if_set("libdir", get_config_var("LIBDIR")) print_if_set("base_prefix", base_prefix) print("executable", sys.executable) print("calcsize_pointer", struct.calcsize("P")) -print("mingw", get_platform() == "mingw") +print("mingw", get_platform().startswith("mingw")) "#; let output = run_python_script(interpreter.as_ref(), SCRIPT)?; let map: HashMap = parse_script_output(&output);