Hello,
While there may be larger plans underfoot to have proper ecosystem and toolchain support for python (namely
Operation Purple Boa), the current situation is quite messy when it comes to supporting both python2 and python3 code in the same repo.
Some github issues that talk about this in more detail for a variety of users:
While we wait for the proper support to come, I propose that we expose the
"py_interpreter" attribute in python rules as public. Or make a new attribute just for the executable python targets.
The only purpose of
this attribute is to
substitute for the PYTHON_BINARY variable in the executable wrapper stub, so the change is fairly well contained.
This will alleviate the pain points for many users for whom it is currently really difficult to support both python2 and python3 uses in their monorepos.
If there is reasonable consensus on this, I can submit a pull request.
Thanks.
Sid