Runfiles library cannot be imported by PY2 targets when the incompatible_default_to_explicit_init_py
flag is enabled.
#413
Labels
Can Close?
Will close in 30 days if there is no new activity
Affected Rule
This relates to the following py_library rule with paired with the
incompatible_default_to_explicit_init_py
flag:https://github.com/bazelbuild/rules_python/blob/master/python/runfiles/BUILD#L40-L44
Is this a regression?
It is not.
Description
By default the, empty
__init__.py
files are automatically created by Bazel in the runfiles tree - this behaviour can be disabled with theincompatible_default_to_explicit_init_py
flag, and I think is expected to flip some time in the future.These
__init__.py
files are still required by Python 2 (I know, I know), so for those who are already using the flag above, the runfiles library becomes un-importable to them.It would be trivial to add the
__init__.py
files explicitly - but I'm not sure if that's fully sensible given the structure of the repo.🔬 Minimal Reproduction
BUILD:
main.py
.bazelrc
The text was updated successfully, but these errors were encountered: