Skip to content

Commit 11b1ec4

Browse files
committed
clarify comment, remove commented out debug code
1 parent 028f9d1 commit 11b1ec4

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

python/private/py_executable_bazel.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,10 @@ def _create_venv(ctx, output_prefix, imports, runtime_details):
363363
if runtime.interpreter:
364364
py_exe_basename = paths.basename(runtime.interpreter.short_path)
365365

366-
# A real symlink is required to support RBE. RBE may materialize what
367-
# ctx.actions.symlink() points to.
366+
# Even though ctx.actions.symlink() is used, using
367+
# declare_symlink() is required to ensure that the resulting file
368+
# in runfiles is always a symlink. An RBE implementation, for example,
369+
# may choose to write what symlink() points to instead.
368370
interpreter = ctx.actions.declare_symlink("{}/bin/{}".format(venv, py_exe_basename))
369371
interpreter_actual_path = runtime.interpreter.short_path
370372
parent = "/".join([".."] * (interpreter_actual_path.count("/") + 1))

python/private/stage1_bootstrap_template.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,6 @@ if [[ "$IS_ZIPFILE" == "1" ]]; then
128128
# The bin/ directory may not exist if it is empty.
129129
mkdir -p "$(dirname $python_exe)"
130130
ln -s "$symlink_to" "$python_exe"
131-
else
132-
:
133-
#set -x
134-
#stat "$python_exe"
135-
#ls -l $(dirname $python_exe)
136-
#set +x
137131
fi
138132

139133
# At this point, we should have a valid reference to the interpreter.

0 commit comments

Comments
 (0)