@@ -44,7 +44,9 @@ def get_platform_identifier():
4444 """Get the full platform identifier (arch-os) for the current system,
4545 matching the identifiers used by the Github publisher.
4646 Returns one of:
47- - universal-apple-darwin (for Mac)
47+ - universal-apple-darwin (for Mac, when CPU arch is None)
48+ - aarch64-apple-darwin (for Mac ARM64)
49+ - x86_64-apple-darwin (for Mac Intel)
4850 - x86_64-pc-windows-msvc (for Windows 64-bit)
4951 - x86_64-unknown-linux-gnu (for Linux x86_64)
5052 - aarch64-unknown-linux-gnu (for Linux ARM64)
@@ -53,7 +55,15 @@ def get_platform_identifier():
5355 machine = platform .machine ().lower ()
5456
5557 if system == "darwin" :
56- return "universal-apple-darwin"
58+ # Identify the CPU architecture for macOS
59+ current_arch = detect_arch ()
60+ if current_arch == "aarch64" :
61+ return "aarch64-apple-darwin"
62+ elif current_arch == "x86_64" :
63+ return "x86_64-apple-darwin"
64+ else :
65+ # Fallback to universal if architecture detection fails
66+ return "universal-apple-darwin"
5767 elif system == "windows" :
5868 return "x86_64-pc-windows-msvc"
5969 elif system == "linux" :
@@ -92,7 +102,7 @@ def download_and_extract_libs(url, platform_name):
92102 for member in zip_ref .namelist ():
93103 print (f" Processing zip member: { member } " )
94104 if member .startswith ("lib/" ) and not member .endswith ("/" ):
95- print (f" Processing lib file from downloadedzip : { member } " )
105+ print (f" Processing lib file from downloaded zip : { member } " )
96106 target_path = platform_dir / os .path .relpath (member , "lib" )
97107 print (f" Moving file to target path: { target_path } " )
98108 target_path .parent .mkdir (parents = True , exist_ok = True )
0 commit comments