From 5534394b06f62468c696c7383b87d7bdc06c609d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 8 Dec 2021 18:40:07 +0200 Subject: [PATCH] Fixed an issue with wrong detecting Windows architecture when Python 32bit is used // Resolve #4134 --- HISTORY.rst | 1 + platformio/util.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index a96d6374..30c9ef9f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -20,6 +20,7 @@ PlatformIO Core 5 - Fixed an issue when the system environment variable does not override a project configuration option (`issue #4125 `_) - Fixed an issue when referencing ``*_dir`` option from a custom project configuration environment (`issue #4110 `_) - Fixed an issue with the CLion template that generated a broken CMake file if user's home directory contained an unescaped backslash (`issue #4071 `_) +- Fixed an issue with wrong detecting Windows architecture when Python 32bit is used (`issue #4134 `_) 5.2.3 (2021-11-05) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/util.py b/platformio/util.py index 8ab144a4..90bce628 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -92,8 +92,8 @@ def singleton(cls): def get_systype(): type_ = platform.system().lower() arch = platform.machine().lower() - if type_ == "windows": - arch = "amd64" if platform.architecture()[0] == "64bit" else "x86" + if type_ == "windows" and "x86" in arch: + arch = "amd64" if "64" in arch else "x86" return "%s_%s" % (type_, arch) if arch else type_