Fix: Incorrect platform tag used for WoA bpy

The platform tag came from virtualized CPU on which Python 3.9 is
running on the buildbot.

Use the same trick to detect the host CPU as for the message on the
splash screen.

Pull Request: https://projects.blender.org/blender/blender/pulls/136085
This commit is contained in:
Sergey Sharybin
2025-03-17 16:18:19 +01:00
committed by Sergey Sharybin
parent e31bfce08a
commit 44c01ff893

View File

@@ -200,7 +200,16 @@ def main() -> None:
machine = cmake_cache_var_or_exit(filepath_cmake_cache, "CMAKE_OSX_ARCHITECTURES")
platform_tag = "macosx_%d_%d_%s" % (target_major, target_minor, machine)
elif sys.platform == "win32":
platform_tag = "win_%s" % (platform.machine().lower())
# Workaround for Python process running in a virtualized environment on Windows-on-Arm:
# use the actual processor architecture instead of the the virtualized one.
#
# The win_arm64 matches the behavior when native WoA Python is used, and also matches
# sysconfig.get_platform() from a native Python build (although it returns win-arm64 with a
# dash and not underscore).
if "ARM" in os.environ.get("PROCESSOR_IDENTIFIER", ""):
platform_tag = "win_arm64"
else:
platform_tag = "win_%s" % (platform.machine().lower())
elif sys.platform == "linux":
glibc = os.confstr("CS_GNU_LIBC_VERSION")
if glibc is None: