File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,17 @@ jobs:
135135 pip install wheel
136136 pip install twine
137137
138- # Download native artifacts
139- python scripts/download_artifacts.py $C2PA_VERSION
138+ # Download native artifacts for the target architecture
139+ if [ "${{ inputs.architecture }}" = "universal2" ]; then
140+ python scripts/download_artifacts.py $C2PA_VERSION universal2
141+ elif [ "${{ inputs.architecture }}" = "arm64" ]; then
142+ python scripts/download_artifacts.py $C2PA_VERSION arm64
143+ elif [ "${{ inputs.architecture }}" = "x86_64" ]; then
144+ python scripts/download_artifacts.py $C2PA_VERSION x86_64
145+ else
146+ echo "Unknown architecture: ${{ inputs.architecture }}"
147+ exit 1
148+ fi
140149
141150 # Determine platform name based on target architecture
142151 if [ "${{ inputs.architecture }}" = "universal2" ]; then
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ def get_platform_identifier() -> str:
4444
4545 if system == "darwin" :
4646 # Prefer specific architecture over universal for better performance
47+ # Universal libraries will be attempted as fallback if specific ones aren't found
4748 current_arch = _get_architecture ()
4849 if current_arch == CPUArchitecture .ARM64 .value :
4950 return "aarch64-apple-darwin"
@@ -184,6 +185,11 @@ def _get_possible_search_paths() -> list[Path]:
184185 # Add platform identifier subfolder
185186 possible_paths .append (base_path / platform_id )
186187
188+ # Add universal fallback for macOS if we're not already looking for universal
189+ if sys .platform == "darwin" and platform_id != "universal-apple-darwin" :
190+ for base_path in base_paths :
191+ possible_paths .append (base_path / "universal-apple-darwin" )
192+
187193 # Add system library paths
188194 possible_paths .extend ([Path (p ) for p in os .environ .get (
189195 "LD_LIBRARY_PATH" , "" ).split (os .pathsep ) if p ])
You can’t perform that action at this time.
0 commit comments