From e3c697a1e9ed94a100e578ca0160eaca21b2b0eb Mon Sep 17 00:00:00 2001 From: PiRK Date: Wed, 21 Aug 2024 10:20:02 +0200 Subject: [PATCH] [electrum] fix the btchip-python dependency for pip > 24.1 Summary: The latest btchip-python release contained a malformed dependency that used to be treated as a warning, but is now treated as an error by recent pip version. And even with the slightly older versions of pip currently used in release scripts we already get an error the Windows build, because there is an additional step (compared with the linux appimage build) that already treats this as an error. It seems like btchip-python is no longer maintained by Ledger, and the proposed fix in https://github.com/LedgerHQ/btchip-python/pull/54 is not going to be merged and released. This diff changes the requirements file to install a version including that patch, downloaded from github's archive API Depends on D16667 Test Plan: Checked that the fix works. ``` python -m venv test-env source test-env/bin/activate pip install pip --upgrade pip --version pip install -r ~/dev/bitcoin-abc/electrum/contrib/deterministic-build/requirements-binaries.txt pip install -r ~/dev/bitcoin-abc/electrum/contrib/deterministic-build/requirements-hw.txt deactivate ``` Checked that the Windows release script works ``` contrib/build-wine/build.sh ``` Checked that the patch commit is based on the latest commit of https://github.com/LedgerHQ/btchip-python/commits/master/ (tag 0.1.32 + 2 commits that fix Fedora packaging). Checked the archive's sha256sum. Reviewers: #bitcoin_abc, roqqit Reviewed By: roqqit Differential Revision: https://reviews.bitcoinabc.org/D16669 --- contrib/deterministic-build/requirements-hw.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/deterministic-build/requirements-hw.txt b/contrib/deterministic-build/requirements-hw.txt index 409592314166..7ef742c7e934 100644 --- a/contrib/deterministic-build/requirements-hw.txt +++ b/contrib/deterministic-build/requirements-hw.txt @@ -1,8 +1,10 @@ attrs==21.4.0 \ --hash=sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4 \ --hash=sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd -btchip-python==0.1.32 \ - --hash=sha256:34f5e0c161c08f65dc0d070ba2ff4c315ed21c4b7e0faa32a46862d0dc1b8f55 +# btchip-python 0.1.32 with a patch to fix a malformed dependency +# See https://github.com/LedgerHQ/btchip-python/pull/54 +https://github.com/EchterAgo/btchip-python/archive/f65cca5dea1cae6031accc961b5754d02c52a106.tar.gz \ + --hash=sha256:586f8ea4d48287c4b744b47dee031dbdaa3a7a2483ba49d3e87efc340177f52d certifi==2024.7.4 \ --hash=sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b \ --hash=sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90