File tree 2 files changed +13
-3
lines changed
2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change
1
+ In setuptools.msvc.EnvironmentInfo, now honor the correct paths when on an ARM host.
Original file line number Diff line number Diff line change @@ -1024,6 +1024,16 @@ def VCTools(self):
1024
1024
------
1025
1025
list of str
1026
1026
paths
1027
+
1028
+ When host CPU is ARM, the tools should be found for ARM.
1029
+
1030
+ >>> getfixture('windows_only')
1031
+ >>> mp = getfixture('monkeypatch')
1032
+ >>> mp.setattr(PlatformInfo, 'current_cpu', 'arm64')
1033
+ >>> ei = EnvironmentInfo(arch='irrelevant')
1034
+ >>> paths = ei.VCTools
1035
+ >>> any('HostARM64' in path for path in paths)
1036
+ True
1027
1037
"""
1028
1038
si = self .si
1029
1039
tools = [os .path .join (si .VCInstallDir , 'VCPackages' )]
@@ -1038,9 +1048,8 @@ def VCTools(self):
1038
1048
tools += [os .path .join (si .VCInstallDir , path )]
1039
1049
1040
1050
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
- )
1051
+ host_id = self .pi .current_cpu .replace ('amd64' , 'x64' ).upper ()
1052
+ host_dir = os .path .join ('bin' , f'Host{ host_id } %s' )
1044
1053
tools += [
1045
1054
os .path .join (si .VCInstallDir , host_dir % self .pi .target_dir (x64 = True ))
1046
1055
]
You can’t perform that action at this time.
0 commit comments