Skip to content

Commit

Permalink
fix: make dependencies platform-specific
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkShawn2020 committed Dec 17, 2024
1 parent af751b6 commit 0b9020c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Remove macOS-specific dependencies for Linux/Windows
if: matrix.os != 'macos-latest'
run: |
poetry remove --without-dev pyobjc-framework-cocoa pyobjc-framework-quartz pyobjc-framework-applicationservices pyobjc-framework-coretext || true
- name: Install dependencies (macOS)
if: matrix.os == 'macos-latest'
run: poetry install --with dev,macos

- name: Install dependencies
run: poetry install --with dev
- name: Install dependencies (Linux/Windows)
if: matrix.os != 'macos-latest'
run: poetry install --with dev --without macos

- name: Install system dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
Expand Down
12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,25 @@ PyQt6 = "^6.4.0"
opencv-python = "^4.8.0"
numpy = "^1.26.0"
mss = "^9.0.1"
pyobjc-framework-cocoa = "^10.3.2"
pyobjc-framework-quartz = "^10.3.2"
pyobjc-framework-applicationservices = "^10.3.2"
pyobjc-framework-coretext = "^10.3.2"
plyer = "^2.1.0"
notify-py = "^0.3.43"
simpleaudio = "^1.0.4"
pydub = "^0.25.1"
pydantic = "^2.10.3"

[tool.poetry.group.macos.dependencies]
pyobjc-framework-cocoa = { version = "^10.3.2", platform = "darwin" }
pyobjc-framework-quartz = { version = "^10.3.2", platform = "darwin" }
pyobjc-framework-applicationservices = { version = "^10.3.2", platform = "darwin" }
pyobjc-framework-coretext = { version = "^10.3.2", platform = "darwin" }

[tool.poetry.group.test.dependencies]
pytest = "^7.4.0"
pytest-qt = "^4.2.0"

[tool.poetry.group.dev.dependencies]
briefcase = "^0.3.20"
py2app = "^0.28.8"
py2app = { version = "^0.28.8", platform = "darwin" }
pyinstaller = "^6.11.1"

[build-system]
Expand Down

0 comments on commit 0b9020c

Please sign in to comment.