小编Ale*_*lex的帖子

父目录中的“Protoc”命令输出 python_out 目录中的整个源目录

我有一个名为的目录protos,其中包含单个.proto文件,但最终会包含多个文件。该目录有一个名为 的同级目录app,我想在其中转储构建的grpcpython 文件。

\n\n

我正在尝试编写一个简单的 bash 脚本,该脚本将调用protoc命令并.proto在 中构建文件protos,并将构建的文件输出到app

\n\n

下面是tree我放置每个文件的位置。

\n\n
\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 build_protos.sh\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 trainingInstance (root module directory)\n    |\n    \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 app\n    \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 app.py\n    |   \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 (where I\'d like my built files to go)\n    |   |\n    |   \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80trainingInstance\n    |      \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80protos\n    |         \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80(where the built files actually go)\n    |\n    \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 protos\n        \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 TrainingService.proto (what I\'d like to compile)\n\n\n
Run Code Online (Sandbox Code Playgroud)\n\n

当我运行时build_protos.sh,文件TrainingService.proto被检测到正常并构建,但不是将构建的文件放入...trainingInstance/app/<file> …

protocol-buffers grpc-python

1
推荐指数
1
解决办法
2878
查看次数

标签 统计

grpc-python ×1

protocol-buffers ×1