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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ BEGIN_UNRELEASED_TEMPLATE
END_UNRELEASED_TEMPLATE
-->

{#1-5-4}
## [1.5.4] - 2025-08-26

[1.5.4]: https://github.com/bazel-contrib/rules_python/releases/tag/1.5.4

{#v1-5-4-fixed}
### Fixed

* (local toolchains) Search for libs in sys._base_executable when available
([#3178](https://github.com/bazel-contrib/rules_python/issues/3178)).

{#1-5-3}
## [1.5.3] - 2025-08-11

Expand Down
16 changes: 15 additions & 1 deletion python/private/get_local_runtime_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,27 @@
import sys
import sysconfig

def _get_base_executable():
"""Returns the base executable path."""
try:
if sys._base_executable: # pylint: disable=protected-access
return sys._base_executable # pylint: disable=protected-access
except AttributeError:
# Bug reports indicate sys._base_executable doesn't exist in some cases,
# but it's not clear why.
# See https://github.com/bazel-contrib/rules_python/issues/3172
pass
# The normal sys.executable is the next-best guess if sys._base_executable
# is missing.
return sys.executable

data = {
"major": sys.version_info.major,
"minor": sys.version_info.minor,
"micro": sys.version_info.micro,
"include": sysconfig.get_path("include"),
"implementation_name": sys.implementation.name,
"base_executable": sys._base_executable,
"base_executable": _get_base_executable(),
}

config_vars = [
Expand Down