Skip to content

Commit

Permalink
fix(runner-py): add protobuf path at runtime due to compiler issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jenspots committed Aug 8, 2024
1 parent 3e7c764 commit 0ca4571
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/runner-py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ system-packages = false
installer = "uv"

[tool.hatch.envs.default.scripts]
proto = "python -m grpc_tools.protoc -I../../proto --python_out=./src/rdfc/proto --pyi_out=./src/rdfc/proto --grpc_python_out=./src/rdfc/proto ../../proto/*.proto"
proto = "python -m grpc_tools.protoc --proto_path=../../proto --python_out=./src/rdfc/proto --pyi_out=./src/rdfc/proto --grpc_python_out=./src/rdfc/proto ../../proto/index.proto"
9 changes: 8 additions & 1 deletion packages/runner-py/src/rdfc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import asyncio

import pathlib
import sys
from rdfc.runtime import Reader, Writer, Processor, Arguments


def main():
src_file = pathlib.Path(__file__).resolve()
src_dir = src_file.parent
proto_dir = f"{src_dir}/proto"

sys.path.append(proto_dir)

async def async_main():
import rdfc.grpc

Expand Down

0 comments on commit 0ca4571

Please sign in to comment.