Browse Source

fix: 💩 fix python compile

tags/v0.1.0
DragonAura 2 years ago
parent
commit
8faa06a811
2 changed files with 10 additions and 0 deletions
  1. +2
    -0
      dependency/Dockerfile/Dockerfile_cpp
  2. +8
    -0
      dependency/shell/py_output.sh

+ 2
- 0
dependency/Dockerfile/Dockerfile_cpp View File

@@ -4,10 +4,12 @@ MAINTAINER eesast
WORKDIR /usr/local

COPY ./CAPI/cpp /usr/local/PlayerCode/CAPI/cpp
COPY ./CAPI/python /usr/local/PlayerCode/CAPI/python
COPY ./dependency/proto /usr/local/PlayerCode/dependency/proto
COPY ./dependency/shell /usr/local/PlayerCode/dependency/shell
WORKDIR /usr/local/PlayerCode/dependency/proto
RUN bash ../shell/cpp_output.sh
RUN bash ../shell/py_output.sh
WORKDIR /usr/local/PlayerCode/CAPI/cpp
COPY ./dependency/shell/compile.sh .
ENTRYPOINT ["bash","./compile.sh"]


+ 8
- 0
dependency/shell/py_output.sh View File

@@ -0,0 +1,8 @@
python3 -m grpc_tools.protoc -I. --python_out=. --pyi_out=. MessageType.proto
python3 -m grpc_tools.protoc -I. --python_out=. --pyi_out=. Message2Clients.proto
python3 -m grpc_tools.protoc -I. --python_out=. --pyi_out=. Message2Server.proto
python3 -m grpc_tools.protoc -I. --python_out=. --pyi_out=. --grpc_python_out=. Services.proto
chmod -R 755 ./
mkdir -p ../../CAPI/python/proto
mv -f ./*.py ../../CAPI/python/proto
mv -f ./*.pyi ../../CAPI/python/proto

Loading…
Cancel
Save