From 021d08c8befc402261aca31ceeab53bf5bbd2ee8 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 24 Dec 2023 18:22:31 +0100 Subject: [PATCH] fix msys build build the sdist and wheel using "build", avoid using setup.py. use "pip install -e ." before invoking pyinstaller, so we have the _version.py built by setuptools_scm and also it compiled the extension modules, so pyinstaller can pick them up. msys2 hack: https://stackoverflow.com/questions/76079590/error-plat-name-must-be-one-of-win32-win-amd64-win-arm32-win-arm6 --- scripts/msys2-build | 7 +++++-- scripts/msys2-install-deps | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/msys2-build b/scripts/msys2-build index 9f6ff5204..377d879a3 100644 --- a/scripts/msys2-build +++ b/scripts/msys2-build @@ -1,5 +1,8 @@ #!/bin/bash -python setup.py build_ext --inplace -python setup.py bdist_wheel +# build borg.exe +SETUPTOOLS_USE_DISTUTILS=stdlib pip install -e . pyinstaller -y scripts/borg.exe.spec + +# build sdist and wheel in dist/... +SETUPTOOLS_USE_DISTUTILS=stdlib python -m build diff --git a/scripts/msys2-install-deps b/scripts/msys2-install-deps index 637008a43..a9a20f678 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-pkgconfig,python-packaging,python-msgpack,python-pip} +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==5.13.2