Open njlr opened 2 years ago
I haven't check into this. If there are binary wheels available for the target platform it should be possible to make this work with transitions, though other language rules have been running into issues with rules_docker's transitions support. it would be a great feature though.
I was wondering how
rules_poetry
might handle this scenario:py_binary
called//:app
with dependencies fromrules_poetry
//:app_image
constructed usingcontainer_image
(fromrules_docker
) that is based on Linux AMD64 that contains thepy_binary
Now, when doing
bazel run //:app
, Poetry should install for the host machine (in this case macOS)But when doing
bazel build //:app_image
, Poetry should install for Linux AMD64, since this is the base of the Docker imageIs there a way to configure
rules_poetry
for this?Perhaps with two calls in the
WORKSPACE
?Is this possible or even required?