From cf436b4114328eed1d1949c5aa1e336a190e6273 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Fri, 3 Jan 2025 22:22:18 -0500 Subject: [PATCH] setuptools.msvc: set host_dir correctly on ARM64 hosts --- setuptools/msvc.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 9c9a63568e..2519851a79 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -1038,9 +1038,13 @@ def VCTools(self): tools += [os.path.join(si.VCInstallDir, path)] elif self.vs_ver >= 15.0: - host_dir = ( - r'bin\HostX86%s' if self.pi.current_is_x86() else r'bin\HostX64%s' - ) + if self.pi.current_is_x86(): + host_dir = r'bin\HostX86%s' + elif self.pi.current_cpu == 'arm64': + host_dir = r'bin\HostARM64%s' + else: + host_dir = r'bin\HostX64%s' + tools += [ os.path.join(si.VCInstallDir, host_dir % self.pi.target_dir(x64=True)) ]