Bazel sh_binary 是否允许调用依赖于某些 pip 包的脚本?
我有以下 sh_binary
sh_binary(
name="worker",
srcs=["worker.sh"],
)
和 worker.sh
看起来
#!/bin/bash
celery -A twoopstracker worker -l INFO &> /app/logs/celery.log &
celery
已使用 pip_install
安装,并且可以被其他 py_binary 依赖,使用诸如 requirement("celery") 之类的东西,
有没有办法让 worker.sh
也可以访问这些要求将使其能够运行 成功地? 我无法使用 deps = [requirement("celery"),]
添加,因为 celery 是 py_library 规则
并且需要 sh_library
。
有没有办法让sh_binary
使用已安装的celery
?
我已经尝试过这里的方法
I have the following sh_binary
sh_binary(
name="worker",
srcs=["worker.sh"],
)
and the worker.sh
looks like
#!/bin/bash
celery -A twoopstracker worker -l INFO &> /app/logs/celery.log &
the celery
has been installed using pip_install
and can be depended upon by other py_binary
using something like requirement("celery"),
Is there a way to make the worker.sh
also have access to these requirements which will enable it to run successfully?
I can't add using the deps = [requirement("celery"),]
since celery is a py_library rule
and sh_library
is expected.
is there a way to make the sh_binary
use the installed celery
?
I've tried the approach here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论