From cd0d0ebff16e399b7ca7b14ad89aedc125e72909 Mon Sep 17 00:00:00 2001 From: Manjunath Tapali Date: Mon, 15 Apr 2024 14:11:06 +0530 Subject: [PATCH] fix(partner-sdk): updated the build, run script file permission and added detailed steps --- examples/connector/python/build.sh | 7 ++++++- examples/connector/python/run.sh | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) mode change 100644 => 100755 examples/connector/python/build.sh mode change 100644 => 100755 examples/connector/python/run.sh diff --git a/examples/connector/python/build.sh b/examples/connector/python/build.sh old mode 100644 new mode 100755 index bc214a7..471ab46 --- a/examples/connector/python/build.sh +++ b/examples/connector/python/build.sh @@ -1,9 +1,14 @@ #!/bin/bash +# Creates virtual environment to install the packages and to run the connector. python3 -m venv connector_run source connector_run/bin/activate +# install the added packages +pip install -r requirements.txt + +# copying protos present in the root of directory to `protos` folder mkdir -p protos cp ../../../*.proto protos/ -pip install -r requirements.txt +# Generates the required gRPC Python files using protos into `sdk_pb2` folder mkdir -p sdk_pb2 python -m grpc_tools.protoc \ --proto_path=./protos/ \ diff --git a/examples/connector/python/run.sh b/examples/connector/python/run.sh old mode 100644 new mode 100755 index 0ca2568..04fd809 --- a/examples/connector/python/run.sh +++ b/examples/connector/python/run.sh @@ -1,3 +1,4 @@ +# activate the created virtual environment during the build and run the main file. source connector_run/bin/activate python main.py deactivate