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
2 changes: 1 addition & 1 deletion py/private/py_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _py_binary_rule_imp(ctx):
ctx,
extra_depsets = [
venv_info.venv_creation_depset,
interpreter.toolchain.files,
interpreter.files,
srcs_depset,
],
extra_runfiles = [
Expand Down
6 changes: 6 additions & 0 deletions py/private/utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ def resolve_toolchain(ctx):

py3_toolchain = toolchain_info.py3_runtime

if py3_toolchain.interpreter != None:
files = depset([py3_toolchain.interpreter], transitive = [py3_toolchain.files])
else:
files = py3_toolchain.files

return struct(
toolchain = py3_toolchain,
files = files,
python = py3_toolchain.interpreter,
flags = ["-B", "-s", "-I"],
)
4 changes: 2 additions & 2 deletions py/private/venv/venv.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _make_venv(ctx, name = None, main = None, strip_pth_workspace_root = None):

venv_creation_depset = depset(
direct = [make_venv_for_action_sh, pth, whl_requirements],
transitive = [wheels_depset, interpreter.toolchain.files],
transitive = [wheels_depset, interpreter.files],
)

ctx.actions.run_shell(
Expand Down Expand Up @@ -164,7 +164,7 @@ def _py_venv_impl(ctx):
ctx,
extra_depsets = [
venv_info.venv_creation_depset,
interpreter.toolchain.files,
interpreter.files,
],
extra_runfiles = ctx.files._runfiles_lib,
extra_runfiles_depsets = [
Expand Down