Improved detection of Windows architecture // Resolve #4353

This commit is contained in:
Ivan Kravets
2022-07-13 18:26:21 +03:00
parent 4278574450
commit a31a7f2b06
2 changed files with 8 additions and 4 deletions

View File

@ -16,6 +16,7 @@ PlatformIO Core 6
6.1.2 (2022-07-??)
~~~~~~~~~~~~~~~~~~
* Improved detection of Windows architecture (`issue #4353 <https://github.com/platformio/platformio-core/issues/4353>`_)
* Fixed a regression bug when `libArchive <https://docs.platformio.org/en/latest/manifests/library-json/fields/build/libarchive.html>`__ option declared in the `library.json <https://docs.platformio.org/en/latest/manifests/library-json/index.html>`__ manifest was ignored (`issue #4351 <https://github.com/platformio/platformio-core/issues/4351>`_)
* Fixed an issue when the `pio pkg publish <https://docs.platformio.org/en/latest/core/userguide/pkg/cmd_publish.html>`__ command didn't work with Python 3.6 (`issue #4352 <https://github.com/platformio/platformio-core/issues/4352>`_)

View File

@ -139,11 +139,14 @@ def singleton(cls):
def get_systype():
type_ = platform.system().lower()
system = platform.system().lower()
arch = platform.machine().lower()
if type_ == "windows" and "x86" in arch:
arch = "amd64" if "64" in arch else "x86"
return "%s_%s" % (type_, arch) if arch else type_
if system == "windows":
if not arch: # issue #4353
arch = "x86_" + platform.architecture()[0]
if "x86" in arch:
arch = "amd64" if "64" in arch else "x86"
return "%s_%s" % (system, arch) if arch else system
def pioversion_to_intstr():