From 71052dc37e340fef1591c986fbca8964ea03a0df Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 4 Nov 2026 22:19:49 +0100 Subject: [PATCH 1/2] CI: re-enable the windows msys2 build It was disabled in #8264 due to a pip bug, which is long fixed. - drop the SETUPTOOLS_USE_DISTUTILS=stdlib workaround, msys2 python has no stdlib distutils anymore (>= 3.12) - use pyinstaller 6.14.2, same as for the other binaries - use actions/upload-artifact@v4, v3 does not work anymore - add a timeout Co-Authored-By: Claude Opus 5.5 --- .github/workflows/windows.yml | 5 +++-- scripts/msys2-build | 4 ++-- scripts/msys2-install-deps | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d902ae6e6d..68f236163a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -3,8 +3,9 @@ on: [push, pull_request] jobs: msys2-ucrt64: - if: false # build is broken, thus disabled, see #8264 + if: true # can be used to temporarily disable the build runs-on: windows-latest + timeout-minutes: 90 defaults: run: shell: msys2 {0} @@ -22,7 +23,7 @@ jobs: run: ./scripts/msys2-build - name: Test run: ./dist/borg.exe -V - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: borg-windows path: dist/borg.exe diff --git a/scripts/msys2-build b/scripts/msys2-build index 377d879a3d..00bfa578cd 100644 --- a/scripts/msys2-build +++ b/scripts/msys2-build @@ -1,8 +1,8 @@ #!/bin/bash # build borg.exe -SETUPTOOLS_USE_DISTUTILS=stdlib pip install -e . +pip install -e . pyinstaller -y scripts/borg.exe.spec # build sdist and wheel in dist/... -SETUPTOOLS_USE_DISTUTILS=stdlib python -m build +python -m build diff --git a/scripts/msys2-install-deps b/scripts/msys2-install-deps index 9c28f0ea95..93a2b517c6 100644 --- a/scripts/msys2-install-deps +++ b/scripts/msys2-install-deps @@ -1,4 +1,4 @@ #!/bin/bash pacman -S --needed --noconfirm git mingw-w64-ucrt-x86_64-{toolchain,pkgconf,zstd,lz4,xxhash,openssl,python,cython,python-setuptools,python-wheel,python-build,python-pkgconfig,python-packaging,python-msgpack,python-pip} -pip install pyinstaller==6.3.0 +pip install pyinstaller==6.14.2 From 28c507208be89027069c2221cef511358d5236c3 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 4 Nov 2026 22:22:35 +0100 Subject: [PATCH 2/2] CI: windows: install pyinstaller into a venv msys2's python is 3.14 now and externally managed (PEP 668), so a system-wide pip install fails. pyinstaller 6.14.2 does not support python 3.14 either, use 6.22.3 (same as master). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/windows.yml | 11 ++++++++++- scripts/msys2-install-deps | 1 - 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 68f236163a..899ba54b81 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -19,8 +19,17 @@ jobs: update: true - name: Install dependencies run: ./scripts/msys2-install-deps + - name: Build python venv + run: | + # msys2's python is externally managed (PEP 668), so pip-installed packages go into a venv. + # --system-site-packages: use the python packages installed via pacman. + python -m venv --system-site-packages env + . env/bin/activate + pip install pyinstaller==6.22.3 - name: Build - run: ./scripts/msys2-build + run: | + . env/bin/activate + ./scripts/msys2-build - name: Test run: ./dist/borg.exe -V - uses: actions/upload-artifact@v4 diff --git a/scripts/msys2-install-deps b/scripts/msys2-install-deps index 93a2b517c6..7e265d67bc 100644 --- a/scripts/msys2-install-deps +++ b/scripts/msys2-install-deps @@ -1,4 +1,3 @@ #!/bin/bash pacman -S --needed --noconfirm git mingw-w64-ucrt-x86_64-{toolchain,pkgconf,zstd,lz4,xxhash,openssl,python,cython,python-setuptools,python-wheel,python-build,python-pkgconfig,python-packaging,python-msgpack,python-pip} -pip install pyinstaller==6.14.2