Skip to content

Commit c7efd79

Browse files
limdoraignas
andauthored
fix(system_python): Remove printing of not always present attribute (bazel-contrib#3781)
This attribute is not part of the Python public API and in Debian 10 Buster (OpenJDK 11, gcc 8.3.0) it seems to not be defined. This reverts one of the debug logging statements added in bazel-contrib#3667 Fixes bazel-contrib#3774 --------- Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
1 parent 61cfa88 commit c7efd79

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ END_UNRELEASED_TEMPLATE
8484
* (pypi) Fix `importlib.metadata.files` by ensuring `RECORD` is included in
8585
installed wheel targets, except when built from sdist
8686
([#3024](https://github.com/bazel-contrib/rules_python/issues/3024)).
87+
* (system_python) Fix AttributeError exception on Debian 10 Buster
88+
python installations which may not set `sys._base_executable`
89+
([#3774](https://github.com/bazel-contrib/rules_python/issues/3774)).
8790
* (windows) Fix `py_test`/`py_binary` failure when the target name contains
8891
path separators; the bootstrap stub is now declared as a sibling of the
8992
`.exe` launcher
@@ -92,7 +95,6 @@ END_UNRELEASED_TEMPLATE
9295
towards the underlying `*.update` target.
9396
([#3787](https://github.com/bazel-contrib/rules_python/pull/3787))
9497

95-
9698
{#v0-0-0-added}
9799
### Added
98100
* (toolchain) Added {obj}`python.override.toolchain_target_settings` to allow

python/private/python_bootstrap_template.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ def main():
568568
print_verbose("VENV_REL_SITE_PACKAGES:", VENV_REL_SITE_PACKAGES)
569569
print_verbose("WORKSPACE_NAME:", WORKSPACE_NAME )
570570
print_verbose("bootstrap sys.executable:", sys.executable)
571-
print_verbose("bootstrap sys._base_executable:", sys._base_executable)
571+
print_verbose("bootstrap sys._base_executable:", getattr(sys, "_base_executable", "unknown"))
572572
print_verbose("bootstrap sys.version:", sys.version)
573573

574574
args = sys.argv[1:]

0 commit comments

Comments
 (0)