Skip to content

Commit

Permalink
πŸ› Fix installer not starting (put path)
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinbreiz committed Jan 3, 2024
1 parent 9a33569 commit d78f83d
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions scripts/make_installer_protos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ PROTO_OUTPUT_DIR=$INSTALLER_DIR/src/protos

cd $INSTALLER_DIR

# Create the protos output directory if it doesn't exist
mkdir -p $PROTO_OUTPUT_DIR

# Generate the Python gRPC code from the .proto files
python3 -m grpc_tools.protoc \
-I${PROTO_DIR} \
--python_out=${PROTO_OUTPUT_DIR} \
--mypy_out=${PROTO_OUTPUT_DIR} \
--grpc_python_out=${PROTO_OUTPUT_DIR} \
--mypy_grpc_out=${PROTO_OUTPUT_DIR} \
${PROTO_DIR}/*.proto
-I${PROTO_DIR} \
--python_out=${PROTO_OUTPUT_DIR} \
--mypy_out=${PROTO_OUTPUT_DIR} \
--grpc_python_out=${PROTO_OUTPUT_DIR} \
--mypy_grpc_out=${PROTO_OUTPUT_DIR} \
${PROTO_DIR}/*.proto

# Create __init__.py file in the protos directory
echo "import sys" > $PROTO_OUTPUT_DIR/__init__.py
echo "import os" >> $PROTO_OUTPUT_DIR/__init__.py
echo "sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))" >> $PROTO_OUTPUT_DIR/__init__.py

0 comments on commit d78f83d

Please sign in to comment.