added python bindings

This commit is contained in:
2025-04-24 15:51:47 +01:00
parent 125d113ade
commit 9075ab5967
4 changed files with 13 additions and 3 deletions

View File

@@ -6,12 +6,19 @@ mkdir Bindings/python/export
# Creating SharedObjects directory for python
mkdir Bindings/python/export/SharedObjects
# Builds p2prc.h and p2prc.so file
# as apart of Go FFI to interacted
# with later on.
sh build-bindings.sh
# Copy the shared object files as well to ensure
# that python can interact with the latest snapshot
# of P2PRC
cp Bindings/p2prc.h Bindings/python/export/SharedObjects/
cp Bindings/p2prc.so Bindings/python/export/SharedObjects/
cp Bindings/python/p2prc.py Bindings/python/export/
# Copy python library and tests as export as well
cp Bindings/python/* Bindings/python/export/
echo "Output is in the Directory Bindings/python/export/"
@@ -25,4 +32,4 @@ echo "Output is in the Directory Bindings/python/export/"
# env GOOS=linux GOARCH=${arch} go build -buildmode=c-shared -o python/export/SharedObjects/linux-${arch}/p2prc.so
# echo "GOOS=linux GOARCH=${arch} go build -buildmode=c-shared -o python/export/SharedObjects/linux-${arch}/p2prc.so"
# cd ..
#done
#done