| commit | 65d132671e89b09e9eb8624a15d2a5d1b481c2ab | [log] [tgz] |
|---|---|---|
| author | Steven Casagrande <steven.casagrande@ibm.com> | Thu Sep 05 13:13:46 2024 -0400 |
| committer | GitHub <noreply@github.com> | Thu Sep 05 17:13:46 2024 +0000 |
| tree | f51b4cbb1dd05078e5b98adf0773d8061424dad7 | |
| parent | 3fd5b8378faea1fb2926d9f49d695b14e4b472c8 [diff] |
fix: make bootstrap_impl=script compute correct directory when RUNFILES_MANIFEST_FILE set (#2177) The script-based bootstrap wasn't computing the correct runfiles directory when `RUNFILES_MANIFEST_FILE` was set. The path it computed stripped off the manifest file name, but didn't re-add the `.runfiles` suffix to point to the runfiles directory. To fix, just re-append the `.runfiles` suffix after it removes the manifest file name portion of the path. Reproducing this is a bit tricky and it's difficult to reproduce the necessary build flags in a test; all of the following must be met: * `--enable_runfiles=false`, but this cannot be set by transitions, only via command line * `--build_runfile_manifests=true` (this can be set in a transition, but see below) * Due to https://github.com/bazelbuild/bazel/issues/7994, even if a manifest is created, the RUNFILES_MANIFEST_FILE env var won't be set _unless_ the test strategy is local (i.e. not sandboxed, which is the default). To work around those issues, the test just recreates the necessary envvar state and invokes the binary. The underlying files may not exist, but that's OK for the code paths were testing. Fixes https://github.com/bazelbuild/rules_python/issues/2186 --------- Co-authored-by: Richard Levasseur <rlevasseur@google.com>
This repository is the home of the core Python rules -- py_library, py_binary, py_test, py_proto_library, and related symbols that provide the basis for Python support in Bazel. It also contains package installation rules for integrating with PyPI and other indices.
Documentation for rules_python is at https://rules-python.readthedocs.io and in the Bazel Build Encyclopedia.
Examples live in the examples directory.
The core rules are stable. Their implementation is subject to Bazel's backward compatibility policy. This repository aims to follow semantic versioning.
The Bazel community maintains this repository. Neither Google nor the Bazel team provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases. See How to contribute page for information on our development workflow.
For detailed documentation, see https://rules-python.readthedocs.io
See Bzlmod support for more details.