From 66eb086c4a6e50a030bf1f6bb392c5e5a568103c Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 24 Dec 2023 18:22:31 +0100 Subject: [PATCH 1/2] fix msys build forward port to get code in sync with 1.4-maint. 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 --- .github/workflows/ci.yml | 5 ++++- scripts/msys2-install-deps | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6ad0bed..d7706002 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -224,8 +224,11 @@ jobs: run: ./scripts/msys2-install-deps development - name: Build run: | - pip install -e . + # 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 - uses: actions/upload-artifact@v3 with: name: borg-windows diff --git a/scripts/msys2-install-deps b/scripts/msys2-install-deps index 227f505d..ef36ae5c 100644 --- a/scripts/msys2-install-deps +++ b/scripts/msys2-install-deps @@ -1,6 +1,6 @@ #!/bin/bash -pacman -S --needed --noconfirm git mingw-w64-ucrt-x86_64-{toolchain,pkgconf,zstd,lz4,xxhash,openssl,python-msgpack,python-argon2_cffi,python-platformdirs,python,cython,python-setuptools,python-wheel,python-pkgconfig,python-packaging,python-pip} +pacman -S --needed --noconfirm git mingw-w64-ucrt-x86_64-{toolchain,pkgconf,zstd,lz4,xxhash,openssl,python-msgpack,python-argon2_cffi,python-platformdirs,python,cython,python-setuptools,python-wheel,python-build,python-pkgconfig,python-packaging,python-pip} pip install pyinstaller if [ "$1" = "development" ]; then From 1a544845a2730f49f33bc25627c727bfc775aaf1 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 24 Dec 2023 18:44:47 +0100 Subject: [PATCH 2/2] use less setup.py, use pip and build todo: clean clean2 build_usage build_man --- .github/workflows/ci.yml | 3 +-- Vagrantfile | 3 +-- requirements.d/development.lock.txt | 5 +++-- requirements.d/development.txt | 1 + scripts/sdist-sign | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7706002..495f0334 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -177,8 +177,7 @@ jobs: # so, set it here, again. PKG_CONFIG_PATH: "/usr/local/opt/openssl@1.1/lib/pkgconfig:$PKG_CONFIG_PATH" run: | - # pip install -e . - python setup.py -v develop + pip install -e . - name: run tox env env: # we already have that in the global env, but something is broken and overwrites that. diff --git a/Vagrantfile b/Vagrantfile index edc2150c..794f276b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -278,8 +278,7 @@ def install_borg(fuse) pip install -U wheel # upgrade wheel, might be too old cd borg pip install -r requirements.d/development.lock.txt - python setup.py clean - python setup.py clean2 + python setup.py clean clean2 pip install -e .[#{fuse}] EOF end diff --git a/requirements.d/development.lock.txt b/requirements.d/development.lock.txt index f6b10ff4..7f5ba8c5 100644 --- a/requirements.d/development.lock.txt +++ b/requirements.d/development.lock.txt @@ -1,8 +1,9 @@ setuptools==68.2.2 setuptools-scm==8.0.4 -pip==23.3.1 +pip==23.3.2 wheel==0.41.3 -virtualenv==20.24.6 +virtualenv==20.25.0 +build==1.0.3 pkgconfig==1.5.5 tox==4.11.3 pytest==7.4.3 diff --git a/requirements.d/development.txt b/requirements.d/development.txt index 6825ec90..09878cee 100644 --- a/requirements.d/development.txt +++ b/requirements.d/development.txt @@ -3,6 +3,7 @@ setuptools_scm pip wheel virtualenv +build pkgconfig tox pytest diff --git a/scripts/sdist-sign b/scripts/sdist-sign index 1186bdee..30cc8f0d 100755 --- a/scripts/sdist-sign +++ b/scripts/sdist-sign @@ -13,7 +13,7 @@ else GPG=qubes-gpg-client-wrapper fi -python setup.py sdist +python -m build D=dist/borgbackup-$R.tar.gz