@@ -46,16 +46,21 @@ def get_platform_identifier():
4646 Returns one of:
4747 - universal-apple-darwin (for Mac)
4848 - x86_64-pc-windows-msvc (for Windows 64-bit)
49- - x86_64-unknown-linux-gnu (for Linux 64-bit)
49+ - x86_64-unknown-linux-gnu (for Linux x86_64)
50+ - aarch64-unknown-linux-gnu (for Linux ARM64)
5051 """
5152 system = platform .system ().lower ()
53+ machine = platform .machine ().lower ()
5254
5355 if system == "darwin" :
5456 return "universal-apple-darwin"
5557 elif system == "windows" :
5658 return "x86_64-pc-windows-msvc"
5759 elif system == "linux" :
58- return "x86_64-unknown-linux-gnu"
60+ if machine in ["arm64" , "aarch64" ]:
61+ return "aarch64-unknown-linux-gnu"
62+ else :
63+ return "x86_64-unknown-linux-gnu"
5964 else :
6065 raise ValueError (f"Unsupported operating system: { system } " )
6166
@@ -105,8 +110,12 @@ def copy_artifacts_to_root():
105110 print ("Copying artifacts from scripts/artifacts to root..." )
106111 if ROOT_ARTIFACTS_DIR .exists ():
107112 shutil .rmtree (ROOT_ARTIFACTS_DIR )
113+ print (f"Copying from { SCRIPTS_ARTIFACTS_DIR } to { ROOT_ARTIFACTS_DIR } " )
108114 shutil .copytree (SCRIPTS_ARTIFACTS_DIR , ROOT_ARTIFACTS_DIR )
109115 print ("Done copying artifacts" )
116+ print ("\n Contents of artifacts directory:" )
117+ for item in sorted (ROOT_ARTIFACTS_DIR .iterdir ()):
118+ print (f" { item .name } " )
110119
111120def main ():
112121 if len (sys .argv ) < 2 :
@@ -126,6 +135,8 @@ def main():
126135 if env_platform :
127136 print (f"Using platform from environment variable C2PA_LIBS_PLATFORM: { env_platform } " )
128137 platform_id = env_platform or get_platform_identifier ()
138+ print ("## platform_id when downloading: " , platform_id )
139+ print ("## env_platform: " , env_platform )
129140 platform_source = "environment variable" if env_platform else "auto-detection"
130141 print (f"Target platform: { platform_id } (set through{ platform_source } )" )
131142
0 commit comments