From 5ac495e547e32ba54841438bcf0ecc00d2432226 Mon Sep 17 00:00:00 2001 From: PanQL Date: Tue, 1 Mar 2022 17:26:19 +0800 Subject: [PATCH 1/2] use platform.system to check if it is on windows --- pyo3-build-config/src/impl_.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyo3-build-config/src/impl_.rs b/pyo3-build-config/src/impl_.rs index b026e76adee..af6bf126dc4 100644 --- a/pyo3-build-config/src/impl_.rs +++ b/pyo3-build-config/src/impl_.rs @@ -188,7 +188,7 @@ def print_if_set(varname, value): print(varname, value) # Windows always uses shared linking -WINDOWS = hasattr(platform, "win32_ver") +WINDOWS = platform.system() == "Windows" # macOS framework packages use shared linking FRAMEWORK = bool(get_config_var("PYTHONFRAMEWORK")) From 84cb8cdb6edf07ea14f502e99cc1163c6957ad29 Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Thu, 3 Mar 2022 07:34:01 +0000 Subject: [PATCH 2/2] add changelog for 2198 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe15defeefd..a2e9d7ab9ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ PyO3 versions, please see the [migration guide](https://pyo3.rs/latest/migration The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Fix incorrect platform detection for Windows in `pyo3-build-config`. [#2198](https://github.com/PyO3/pyo3/pull/2198) + ## [0.16.0] - 2022-02-27 ### Packaging