Ensure py_library targets propagate their directories as imports.
Python imports in Android are relative to module roots, i.e. if
a/b/__init__.py (py_binary) has a dep on c/d/__init__.py (py_library)
where the former module is `b` and the latter is `d`, `a/b/__init__.py`
can just declare `import d` to use `d`. In Bazel, it has to be `import
c.d`. This change ensures that `c` is in the PYTHONPATH of the `b`
py_binary, allowing existing imports to work in Android with Bazel's
python rules.
Bug: 207812332
Test: b run //build/soong/cc/ndkstubgen
Change-Id: I15ac8ae6aa92f4c3e4e299343defb6748c44ddbe
2 files changed