Skip to content

Commit cf436b4

Browse files
committed
setuptools.msvc: set host_dir correctly on ARM64 hosts
1 parent 53d5ac2 commit cf436b4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

setuptools/msvc.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,9 +1038,13 @@ def VCTools(self):
10381038
tools += [os.path.join(si.VCInstallDir, path)]
10391039

10401040
elif self.vs_ver >= 15.0:
1041-
host_dir = (
1042-
r'bin\HostX86%s' if self.pi.current_is_x86() else r'bin\HostX64%s'
1043-
)
1041+
if self.pi.current_is_x86():
1042+
host_dir = r'bin\HostX86%s'
1043+
elif self.pi.current_cpu == 'arm64':
1044+
host_dir = r'bin\HostARM64%s'
1045+
else:
1046+
host_dir = r'bin\HostX64%s'
1047+
10441048
tools += [
10451049
os.path.join(si.VCInstallDir, host_dir % self.pi.target_dir(x64=True))
10461050
]

0 commit comments

Comments
 (0)