Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bazel] Fix lit tests with python 3.11+ (#87022)
In python3.11 there is a new environment variable PYTHONSAFEPATH which stops python from setting the current directory as the first entry in sys.path. Bazel started setting this to ensure that python targets don't accidentally access things that aren't in their dependency tree. This resulted in lit tests breaking because sys.path didn't include the directory to the lit source files. This is fixed by adding the lit binary to the dependency tree and propagating the import path from it. Fixes #75963
- Loading branch information