1919def get_lib_filename ():
2020 """
2121 Return the platform-specific filename for the shared library.
22- For Windows, select the binary based on the machine architecture.
2322 """
2423 machine = platform .machine ().lower ()
2524 if sys .platform .startswith ("darwin" ):
@@ -28,13 +27,7 @@ def get_lib_filename():
2827 elif sys .platform .startswith ("linux" ):
2928 return "libqsharp_bridge.so"
3029 elif sys .platform .startswith ("win" ):
31- # what an ambition, arm64 Windows support. maybe it will work?
32- if machine in ("amd64" , "x86_64" ):
33- return "qsharp_bridge.dll"
34- elif machine in ("arm64" , "aarch64" ):
35- return "qsharp_bridge_arm64.dll"
36- else :
37- return "qsharp_bridge.dll"
30+ return "qsharp_bridge.dll"
3831 else :
3932 raise RuntimeError (f"Unsupported platform: { sys .platform } " )
4033
@@ -68,14 +61,16 @@ def run(self):
6861 class bdist_wheel (_bdist_wheel ):
6962 def finalize_options (self ):
7063 self .plat_name_supplied = True
71-
72- # Set the platform tag based on the system
7364 if sys .platform .startswith ('linux' ):
7465 self .plat_name = "py3-none-linux_x86_64"
7566 elif sys .platform .startswith ('darwin' ):
7667 self .plat_name = "py3-none-macosx_11_0_universal2"
7768 elif sys .platform .startswith ('win' ):
78- self .plat_name = "py3-none-win_amd64"
69+ machine = platform .machine ().lower ()
70+ if machine in ("arm64" , "aarch64" ):
71+ self .plat_name = "py3-none-win_arm64"
72+ else :
73+ self .plat_name = "py3-none-win_amd64"
7974 else :
8075 # Fall back to default behavior for unknown platforms
8176 self .plat_name_supplied = False
0 commit comments