Make Python examples in one step: run-setup.py

This commit is contained in:
ghubstan 2022-03-19 13:51:49 -03:00
parent 4b1d1c9874
commit 478d578a6c
No known key found for this signature in database
GPG Key ID: E35592D6800A861E
2 changed files with 9 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
echo "Downloading Bisq protobuf files from github to $PROTO_PATH directory." echo "Downloading Bisq protobuf files from github to $PROTO_PATH directory..."
echo "You may want to skip this step and copy your own local .proto files instead." echo "You can skip this step and copy your own local .proto files instead."
# Download the Bisq master branch's protobuf definition files. # Download the Bisq master branch's protobuf definition files.
curl -o ./pb.proto https://raw.githubusercontent.com/bisq-network/bisq/master/proto/src/main/proto/pb.proto curl -o ./pb.proto https://raw.githubusercontent.com/bisq-network/bisq/master/proto/src/main/proto/pb.proto

View File

@ -3,11 +3,17 @@
# This script must be run from this directory. # This script must be run from this directory.
# Install python3-venv if necessary. # Install python3-venv if necessary.
# For systems using the apt package manager, uncomment the line below, or install the equivalent package for your system.
# sudo apt install python3-venv # sudo apt install python3-venv
# Install Python setuptools if necessary. # Install pip, then Python setuptools if necessary.
# pip install setuptools # pip install setuptools
# Download the Bisq protobuf definition files from the Bisq repository.
cd ../proto-downloader
./download-bisq-protos.sh
cd ../python-examples
# Generate gRPC Python protobuf classes. You can download them from the # Generate gRPC Python protobuf classes. You can download them from the
# Bisq repo with the proto-downloader/download-bisq-protos.sh script. # Bisq repo with the proto-downloader/download-bisq-protos.sh script.
echo "Generating gRPC Python service stubs..." echo "Generating gRPC Python service stubs..."