Use temporary venv to use bech32 in python script
This commit is contained in:
parent
6a662820b5
commit
7caeca926f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
*-deployment
|
||||
*-spec.yml
|
||||
mainnet-genesis
|
||||
output
|
||||
|
||||
# Playbook vars
|
||||
*-vars.yml
|
||||
|
||||
@ -37,12 +37,18 @@ docker run \
|
||||
# --------
|
||||
|
||||
# Install required bech32 dependency
|
||||
# TODO: Avoid installing bech32 system-wide
|
||||
python3 -m pip install bech32 --break-system-packages
|
||||
# Define and create venv if not exists
|
||||
venv_dir="$PWD/venv"
|
||||
if [ ! -d "$venv_dir" ]; then
|
||||
python3 -m venv "$venv_dir"
|
||||
"$venv_dir/bin/pip" install bech32
|
||||
fi
|
||||
|
||||
# Carry over state from testnet to mainnet
|
||||
echo "Carrying over state from testnet state to mainnet genesis..."
|
||||
python3 $script_dir/transfer-state.py
|
||||
"$venv_dir/bin/python" "$script_dir/transfer-state.py"
|
||||
|
||||
# Clean up venv
|
||||
rm -rf "$venv_dir"
|
||||
|
||||
# --------
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user