Skip to content

Commit

Permalink
setuptools.msvc: set host_dir correctly on ARM64 hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
swt2c committed Jan 4, 2025
1 parent 53d5ac2 commit cf436b4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions setuptools/msvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
]
Expand Down

0 comments on commit cf436b4

Please sign in to comment.