Skip to content

Commit ada58bd

Browse files
feat: Add Homebrew dependencies installation for pyexiv2 on macOS
1 parent 3e961d1 commit ada58bd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/release-build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@ jobs:
132132
# This ensures the directory structure exists in the packaged app
133133
mkdir -p models
134134
135+
- name: Install pyexiv2 dependencies (macOS)
136+
if: runner.os == 'macOS'
137+
shell: bash
138+
run: |
139+
# Install Homebrew dependencies required by pyexiv2
140+
brew install inih
141+
135142
- name: Build with PyInstaller (Windows)
136143
if: runner.os == 'Windows'
137144
run: |
@@ -195,6 +202,13 @@ jobs:
195202
- name: Build with PyInstaller (macOS)
196203
if: runner.os == 'macOS'
197204
run: |
205+
# Determine Homebrew prefix (different for Intel vs Apple Silicon)
206+
if [ -d "/opt/homebrew" ]; then
207+
BREW_PREFIX="/opt/homebrew"
208+
else
209+
BREW_PREFIX="/usr/local"
210+
fi
211+
198212
pyinstaller -w --name PhotoSort \
199213
--icon assets/photosort.icns \
200214
--paths src \
@@ -209,6 +223,8 @@ jobs:
209223
--hidden-import pyexiv2 \
210224
--collect-binaries pyexiv2 \
211225
--copy-metadata pyexiv2 \
226+
--add-binary "${BREW_PREFIX}/opt/inih/lib/libinih.0.dylib:." \
227+
--add-binary "${BREW_PREFIX}/opt/inih/lib/libINIReader.0.dylib:." \
212228
--hidden-import cv2 \
213229
--hidden-import onnxruntime \
214230
--hidden-import torchvision \

0 commit comments

Comments
 (0)