Fixed an issue with wrong detecting Windows architecture when Python 32bit is used // Resolve #4134

This commit is contained in:
Ivan Kravets
2021-12-08 18:40:07 +02:00
parent 24fc2f7e14
commit 5534394b06
2 changed files with 3 additions and 2 deletions

View File

@ -20,6 +20,7 @@ PlatformIO Core 5
- Fixed an issue when the system environment variable does not override a project configuration option (`issue #4125 <https://github.com/platformio/platformio-core/issues/4125>`_)
- Fixed an issue when referencing ``*_dir`` option from a custom project configuration environment (`issue #4110 <https://github.com/platformio/platformio-core/issues/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 <https://github.com/platformio/platformio-core/issues/4071>`_)
- Fixed an issue with wrong detecting Windows architecture when Python 32bit is used (`issue #4134 <https://github.com/platformio/platformio-core/issues/4134>`_)
5.2.3 (2021-11-05)
~~~~~~~~~~~~~~~~~~

View File

@ -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_