From e7bb32a4858a31ab8abc903347d692dde53c3b8a Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Tue, 23 Jul 2024 23:29:21 +0200 Subject: [PATCH] #4654 pyblock 2.7.1 (#4655) Update PyBlock to 2.7.1 --- CHANGES.md | 1 + home.admin/_commands.sh | 4 ++-- home.admin/config.scripts/bonus.pyblock.sh | 13 +++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5723fc1cb..ce4308763 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,7 @@ - Update: show progress of electrs building index on LCD - Update: lndmanage 0.16.0 [details](https://github.com/bitromortac/lndmanage) - Update: Lightning Terminal v0.12.5-alpha [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.12.5-alpha) +- Update: PyBlock 2.7.1 [details](https://github.com/curly60e/pyblock/blob/master/README.md) - Experimental: charge-lnd install script [details](https://github.com/raspiblitz/raspiblitz/discussions/3955) - Experimental: config.scripts/lnd.signaddress.sh to easy sign messages on addresses on LND [details](https://github.com/raspiblitz/raspiblitz/issues/4540) - Experimental: config.scripts/bonus.elements.sh install elements blockchain platform [details](https://github.com/ElementsProject/elements) diff --git a/home.admin/_commands.sh b/home.admin/_commands.sh index 640f625a3..417466c2b 100755 --- a/home.admin/_commands.sh +++ b/home.admin/_commands.sh @@ -357,8 +357,8 @@ function bos() { # switch to the pyblock user for PyBLOCK function pyblock() { if [ $(grep -c "pyblock=on" < /mnt/hdd/raspiblitz.conf) -eq 1 ]; then - cd /home/pyblock - sudo -u pyblock /home/pyblock/.local/bin/pyblock + cd /home/pyblock/pyblock + sudo -u pyblock poetry run python -m pybitblock.console else echo "PyBlock is not installed - to install run:" echo "/home/admin/config.scripts/bonus.pyblock.sh on" diff --git a/home.admin/config.scripts/bonus.pyblock.sh b/home.admin/config.scripts/bonus.pyblock.sh index 1d92a4082..239e52675 100644 --- a/home.admin/config.scripts/bonus.pyblock.sh +++ b/home.admin/config.scripts/bonus.pyblock.sh @@ -41,18 +41,23 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # install hexyl sudo apt-get install -y hexyl html2text + ## WORKAROUND: see https://github.com/raspiblitz/raspiblitz/issues/4383 # install via pip # sudo -u pyblock pip3 install pybitblock # install from github sudo -u pyblock git clone https://github.com/curly60e/pyblock.git cd pyblock - sudo -u pyblock git checkout v2.2.3 - sudo -u pyblock sed -i 's/jq = "1.2.2"/jq = "1.2.3"/' pyproject.toml - sudo -u pyblock pip install . + sudo -u pyblock git checkout v2.7.1 + sudo -u pyblock sed -i 's/^python =.*$/python = ">=3.11,<4.0"/' pyproject.toml + sudo -u pyblock poetry lock + sudo -u pyblock poetry install + envPath=$(sudo -u pyblock poetry env info --path) + sudo -u pyblock ${envPath}/bin/pip uninstall -y typer click + sudo -u pyblock ${envPath}/bin/pip install typer==0.4.0 click==8.0.0 # set PATH for the user - sudo bash -c "echo 'PATH=\$PATH:/home/pyblock/.local/bin/' >> /home/pyblock/.profile" + sudo bash -c "echo 'PATH=\$PATH:${envPath}/bin' >> /home/pyblock/.profile" # add user to group with admin access to lnd sudo /usr/sbin/usermod --append --groups lndadmin pyblock