Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ Unreleased changes template.
change. Fixes [#2468](https://github.com/bazelbuild/rules_python/issues/2468).
+ (gazelle) Gazelle no longer ignores `setup.py` files by default. To restore
this behavior, apply the `# gazelle:python_ignore_files setup.py` directive.
* Don't re-fetch whl_library, python_repository, etc. repository rules
whenever `PATH` changes. Fixes
[#2551](https://github.com/bazelbuild/rules_python/issues/2551).

[pep-695]: https://peps.python.org/pep-0695/

Expand Down
4 changes: 2 additions & 2 deletions python/private/repo_utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _which_checked(mrctx, binary_name):
def _which_unchecked(mrctx, binary_name):
"""Tests to see if a binary exists.

This is also watch the `PATH` environment variable.
Watches the `PATH` environment variable if the binary doesn't exist.

Args:
binary_name: name of the binary to find.
Expand All @@ -268,12 +268,12 @@ def _which_unchecked(mrctx, binary_name):
* `describe_failure`: `Callable | None`; takes no args. If the
binary couldn't be found, provides a detailed error description.
"""
path = _getenv(mrctx, "PATH", "")
binary = mrctx.which(binary_name)
if binary:
_watch(mrctx, binary)
describe_failure = None
else:
path = _getenv(mrctx, "PATH", "")
describe_failure = lambda: _which_describe_failure(binary_name, path)

return struct(
Expand Down