Allow customization of Python rules
I have a use case where I'd like to use the py_binary from rules_py as the backend of ros2_py_binary instead of the default one from rules_python. My current solution is a local patch. Would there be any issues with allowing customization from the user? We could probably simply expose the target parameter and default it to None. If it's set, we'll use it. Otherwise, we use the variant from rules_python just like today. What do you think? Am I missing anything? If not, I would put up a PR with this change.
Fine by me, please create a PR.
Just curious, why do you patch this repo at the moment? You could juse pass target argument to https://github.com/mvukov/rules_ros2/blob/main/ros2/py_defs.bzl#L8.
Just curious, why do you patch this repo at the moment? You could juse pass target argument to https://github.com/mvukov/rules_ros2/blob/main/ros2/py_defs.bzl#L8.
I actually tried that, but Bazel told me I was not allowed to use that macro. Looks like macros with leading underscore are automatically made private.