Skip to content

Commit e1d81b8

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

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

setuptools/msvc.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,9 +1038,11 @@ 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_cpu in ('x86', 'arm64'):
1042+
host_id = self.pi.current_cpu.upper()
1043+
else:
1044+
host_id = 'X64'
1045+
host_dir = os.path.join('bin', f'Host{host_id}%s')
10441046
tools += [
10451047
os.path.join(si.VCInstallDir, host_dir % self.pi.target_dir(x64=True))
10461048
]

0 commit comments

Comments
 (0)