From 687bcc2779ef9623719d6b5070305da2850b601f Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Wed, 22 Oct 2025 19:30:36 +0200 Subject: [PATCH] Update MacOS build --- .github/workflows/build_assets.yml | 24 ++++++++++++------------ .github/workflows/i18n.yml | 10 +++++++--- .github/workflows/test_linux.yml | 2 +- pyproject.toml | 9 ++++++--- setup/macos/build.sh | 1 - 5 files changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml index 291da081..bb90b5b5 100644 --- a/.github/workflows/build_assets.yml +++ b/.github/workflows/build_assets.yml @@ -6,27 +6,27 @@ jobs: buildAssets: runs-on: ubuntu-latest steps: - - name: Python Setup - uses: actions/setup-python@v6 - with: - python-version: "3.13" - architecture: x64 + - name: Checkout Source + uses: actions/checkout@v5 - - name: Install Packages (apt) + - name: Install System Packages run: | sudo apt update sudo apt install qttools5-dev-tools latexmk texlive texlive-latex-extra - - name: Checkout Source - uses: actions/checkout@v5 + - name: Install UV and Python + uses: astral-sh/setup-uv@v6 + with: + python-version: "3.13" - - name: Install Packages (pip) - run: pip install -U -r requirements.txt -r docs/requirements.txt + - name: Sync UV + run: | + uv sync --no-dev --group docs - name: Build Assets run: | - python pkgutils.py build-assets - python pkgutils.py icons optional + uv run --no-sync pkgutils.py qtlrelease + uv run --no-sync pkgutils.py sample - name: Upload Artifacts uses: actions/upload-artifact@v4 diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml index 82a22f10..238ae27a 100644 --- a/.github/workflows/i18n.yml +++ b/.github/workflows/i18n.yml @@ -14,14 +14,18 @@ jobs: with: python-version: "3.13" architecture: x64 - - name: Install Packages (apt) + + - name: Checkout Source + uses: actions/checkout@v5 + + - name: Install System Packages run: | sudo apt update sudo apt install qttools5-dev-tools - - name: Checkout Source - uses: actions/checkout@v5 + - name: Build Assets run: python pkgutils.py qtlrelease + - name: Upload Artifacts uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/test_linux.yml b/.github/workflows/test_linux.yml index 6a0d18d0..b900128f 100644 --- a/.github/workflows/test_linux.yml +++ b/.github/workflows/test_linux.yml @@ -40,7 +40,7 @@ jobs: run: | uv sync --no-dev --group test - - name: Run Build Commands + - name: Build Assets run: | uv run --no-sync pkgutils.py qtlrelease uv run --no-sync pkgutils.py sample diff --git a/pyproject.toml b/pyproject.toml index 5b5c3a9e..d8ebd34f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,8 @@ description = "A plain text editor for planning and writing novels" readme = { file = "setup/description_pypi.md", content-type = "text/markdown" } license = "GPL-3.0-or-later AND Apache-2.0 AND CC-BY-4.0" license-files = ["LICENSE.md", "setup/LICENSE-Apache-2.0.txt"] +dynamic = ["version"] +requires-python = ">=3.10" classifiers = [ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", @@ -23,9 +25,10 @@ classifiers = [ "Natural Language :: English", "Topic :: Text Editors", ] -requires-python = ">=3.10" -dependencies = ["pyqt6>=6.4", "pyenchant>=3.0.0"] -dynamic = ["version"] +dependencies = [ + "pyqt6>=6.4", + "pyenchant>=3.3.0", # 3.3 is needed for MacOS AARCH64 builds +] [dependency-groups] dev = [ diff --git a/setup/macos/build.sh b/setup/macos/build.sh index ca475fa1..d9e4f601 100755 --- a/setup/macos/build.sh +++ b/setup/macos/build.sh @@ -109,7 +109,6 @@ conda install -c conda-forge enchant hunspell-en --yes # Install dependencies echo "Installing Python dependencies ..." pip install -r "$SRC_DIR/requirements.txt" -pip install pyenchant==3.3.0rc1 # Leave conda env conda deactivate