added python bindings
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -43,6 +43,9 @@ p2prc.PublicKeyBareMetal
|
|||||||
# Ignore pem files
|
# Ignore pem files
|
||||||
*.pem
|
*.pem
|
||||||
|
|
||||||
|
# ignore virtual env file
|
||||||
|
venv
|
||||||
|
|
||||||
# Nix and Nix flake files
|
# Nix and Nix flake files
|
||||||
result
|
result
|
||||||
result-*
|
result-*
|
||||||
|
|||||||
BIN
Bindings/python/.DS_Store
vendored
BIN
Bindings/python/.DS_Store
vendored
Binary file not shown.
@@ -641,7 +641,7 @@ cd Bindings/python/export/
|
|||||||
# list files
|
# list files
|
||||||
ls
|
ls
|
||||||
# Expected output
|
# Expected output
|
||||||
SharedObjects/ p2prc.py
|
SharedObjects/ library.py requirements.txt
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Above shows a generated folder which consists of a folder called
|
Above shows a generated folder which consists of a folder called
|
||||||
|
|||||||
@@ -6,12 +6,19 @@ mkdir Bindings/python/export
|
|||||||
# Creating SharedObjects directory for python
|
# Creating SharedObjects directory for python
|
||||||
mkdir Bindings/python/export/SharedObjects
|
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
|
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.h Bindings/python/export/SharedObjects/
|
||||||
cp Bindings/p2prc.so 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/"
|
echo "Output is in the Directory Bindings/python/export/"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user