@@ -17,28 +17,25 @@ def get_version():
1717PLATFORM_EXTENSIONS = {
1818 'win_amd64' : 'dll' ,
1919 'win_arm64' : 'dll' ,
20- 'macosx_x86_64' : 'dylib' ,
21- 'apple-darwin' : 'dylib' , # we need to update the published keys
20+ 'apple-darwin' : 'dylib' , # universal
2221 'linux_x86_64' : 'so' ,
2322 'linux_aarch64' : 'so' ,
2423}
2524
2625# Based on what c2pa-rs repo publishes
2726PLATFORM_FOLDERS = {
2827 'universal-apple-darwin' : 'dylib' ,
29- 'aarch64-apple-darwin' : 'dylib' ,
30- 'x86_64-apple-darwin' : 'dylib' ,
3128 'x86_64-pc-windows-msvc' : 'dll' ,
3229 'x86_64-unknown-linux-gnu' : 'so' ,
33- 'aarch64-unknown-linux-gnu' : 'so' , # Add ARM Linux support
30+ 'aarch64-unknown-linux-gnu' : 'so' ,
3431}
3532
3633# Directory structure
3734ARTIFACTS_DIR = Path ('artifacts' ) # Where downloaded libraries are stored
3835PACKAGE_LIBS_DIR = Path ('src/c2pa/libs' ) # Where libraries will be copied for the wheel
3936
4037
41- def get_platform_identifier (cpu_arch = None ) -> str :
38+ def get_platform_identifier () -> str :
4239 """Get a platform identifier (arch-os) for the current system,
4340 matching downloaded identifiers used by the Github publisher.
4441
@@ -47,24 +44,15 @@ def get_platform_identifier(cpu_arch = None) -> str:
4744 cpu_arch: Optional CPU architecture for macOS. If not provided, returns universal build.
4845
4946 Returns one of:
50- - universal-apple-darwin (for Mac, when cpu_arch is None, fallback)
51- - aarch64-apple-darwin (for Mac ARM64)
52- - x86_64-apple-darwin (for Mac x86_64)
47+ - universal-apple-darwin (for macOS)
5348 - x86_64-pc-windows-msvc (for Windows 64-bit)
5449 - x86_64-unknown-linux-gnu (for Linux 64-bit)
5550 - aarch64-unknown-linux-gnu (for Linux ARM64)
5651 """
5752 system = platform .system ().lower ()
5853
5954 if system == "darwin" :
60- if cpu_arch is None :
61- return "universal-apple-darwin"
62- elif cpu_arch == "arm64" :
63- return "aarch64-apple-darwin"
64- elif cpu_arch == "x86_64" :
65- return "x86_64-apple-darwin"
66- else :
67- raise ValueError (f"Unsupported CPU architecture for macOS: { cpu_arch } " )
55+ return "universal-apple-darwin"
6856 elif system == "windows" :
6957 return "x86_64-pc-windows-msvc"
7058 elif system == "linux" :
0 commit comments