Skip to content

Commit ade95c0

Browse files
committed
seems like venv isnt supported?
1 parent 536672f commit ade95c0

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

python/private/py_executable.bzl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,13 @@ def _create_venv(ctx, output_prefix, imports, runtime_details, add_runfiles_root
548548
# needed or used at runtime. However, the zip code uses the interpreter
549549
# File object to figure out some paths.
550550
interpreter = ctx.actions.declare_file("{}/{}".format(bin_dir, py_exe_basename))
551-
ctx.actions.write(interpreter, "actual:{}".format(interpreter_actual_path))
551+
552+
# todo: system_python not handling this case
553+
##ctx.actions.write(interpreter, "actual:{}".format(interpreter_actual_path))
554+
ctx.actions.write(
555+
interpreter,
556+
"#!/bin/sh\necho 'tried to use venv interpreter when it should not'; exit 1",
557+
)
552558

553559
elif runtime.interpreter:
554560
# Even though ctx.actions.symlink() is used, using

python/private/python_bootstrap_template.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,9 @@ def _RunExecv(python_program, argv, env):
357357
raise
358358

359359
def Main():
360+
print_verbose("sys.executable:", sys.executable)
361+
print_verbose("sys._base_executable:", sys._base_executable)
362+
print_verbose("sys.version:", sys.version)
360363
print_verbose("initial argv:", values=sys.argv)
361364
print_verbose("initial cwd:", os.getcwd())
362365
print_verbose("initial environ:", mapping=os.environ)

0 commit comments

Comments
 (0)