Skip to content

Commit

Permalink
[electrum] fix the btchip-python dependency for pip > 24.1
Browse files Browse the repository at this point in the history
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 LedgerHQ/btchip-python#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
  • Loading branch information
PiRK authored and abc-bot committed Aug 27, 2024
1 parent 9c7938e commit e3c697a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contrib/deterministic-build/requirements-hw.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e3c697a

Please sign in to comment.