Last active
November 1, 2022 02:03
-
-
Save gimre-xymcity/7faa9f2d6f8e7e671851a197b2b77bd1 to your computer and use it in GitHub Desktop.
Installing py sdk from dev branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update && apt-get install -y python3 python3-pip git | |
git clone -b dev https://github.com/symbol/symbol.git | |
cd symbol/sdk/python | |
./scripts/ci/setup_build.sh | |
python3 -m pip install -r requirements.txt | |
# generate catbuffer models and test vectors | |
./scripts/ci/build.sh | |
# Now, there are two possible routes | |
# 1. use `PYTHONPATH` and point it to symbol/sdk/python | |
# 2. build package and install it in the system | |
# steps below describe second route | |
### | |
### Route 2 | |
### | |
# build local wheel / sdist | |
python3 -m pip install poetry | |
poetry build | |
# install the package | |
cd dist | |
python3 -m pip install symbol_sdk_python-3.0.3-py3-none-any.whl | |
# check if it works | |
python3 -c 'import symbolchain' && echo "SUCCESS" | |
# small test | |
cat <<EOF >/tmp/nemesis-address.py | |
from symbolchain.facade.SymbolFacade import SymbolFacade | |
from symbolchain.CryptoTypes import PublicKey | |
f = SymbolFacade('mainnet') | |
print(f.network.public_key_to_address(PublicKey('BE0B4CF546B7B4F4BBFCFF9F574FDA527C07A53D3FC76F8BB7DB746F8E8E0A9F'))) | |
EOF | |
python3 /tmp/nemesis-address.py | |
# should print NASYMBOLLK6FSL7GSEMQEAWN7VW55ZSZU25TBOA |
Author
gimre-xymcity
commented
Oct 31, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment