Skip to content

Commit f91f002

Browse files
committed
chore: rebase
1 parent 9d94470 commit f91f002

File tree

5 files changed

+8
-84
lines changed

5 files changed

+8
-84
lines changed

MODULE.bazel.orig

-75
This file was deleted.

py/private/py_binary.bzl

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ load("@aspect_bazel_lib//lib:paths.bzl", "BASH_RLOCATION_FUNCTION", "to_rlocatio
44
load("@aspect_bazel_lib//lib:expand_make_vars.bzl", "expand_locations", "expand_variables")
55
load("//py/private:py_library.bzl", _py_library = "py_library_utils")
66
load("//py/private:py_semantics.bzl", _py_semantics = "semantics")
7-
load("//py/private/toolchain:types.bzl", "PY_TOOLCHAIN", "SH_TOOLCHAIN", "VENV_TOOLCHAIN")
7+
load("//py/private/toolchain:types.bzl", "PY_TOOLCHAIN", "VENV_TOOLCHAIN")
88

99
def _dict_to_exports(env):
1010
return [
@@ -13,7 +13,6 @@ def _dict_to_exports(env):
1313
]
1414

1515
def _py_binary_rule_impl(ctx):
16-
sh_toolchain = ctx.toolchains[SH_TOOLCHAIN]
1716
venv_toolchain = ctx.toolchains[VENV_TOOLCHAIN]
1817
py_toolchain = _py_semantics.resolve_toolchain(ctx)
1918

@@ -67,7 +66,6 @@ def _py_binary_rule_impl(ctx):
6766
template = ctx.file._run_tmpl,
6867
output = executable_launcher,
6968
substitutions = {
70-
"{{SHELL_BIN}}": sh_toolchain.path,
7169
"{{BASH_RLOCATION_FN}}": BASH_RLOCATION_FUNCTION,
7270
"{{INTERPRETER_FLAGS}}": " ".join(py_toolchain.flags),
7371
"{{VENV_TOOL}}": to_rlocation_path(ctx, venv_toolchain.bin),
@@ -158,7 +156,6 @@ py_base = struct(
158156
implementation = _py_binary_rule_impl,
159157
attrs = _attrs,
160158
toolchains = [
161-
SH_TOOLCHAIN,
162159
PY_TOOLCHAIN,
163160
VENV_TOOLCHAIN,
164161
],

py/private/py_venv.bzl

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ load("@bazel_skylib//lib:paths.bzl", "paths")
55
load("//py/private:providers.bzl", "PyVirtualInfo")
66
load("//py/private:py_library.bzl", _py_library = "py_library_utils")
77
load("//py/private:py_semantics.bzl", _py_semantics = "semantics")
8-
load("//py/private/toolchain:types.bzl", "PY_TOOLCHAIN", "SH_TOOLCHAIN", "VENV_TOOLCHAIN")
8+
load("//py/private/toolchain:types.bzl", "PY_TOOLCHAIN", "VENV_TOOLCHAIN")
99

1010
def _py_venv_rule_imp(ctx):
11-
sh_toolchain = ctx.toolchains[SH_TOOLCHAIN]
1211
venv_toolchain = ctx.toolchains[VENV_TOOLCHAIN]
1312
py_toolchain = _py_semantics.resolve_toolchain(ctx)
1413

@@ -41,7 +40,6 @@ def _py_venv_rule_imp(ctx):
4140
template = ctx.file._venv_tmpl,
4241
output = executable_launcher,
4342
substitutions = {
44-
"{{SHELL_BIN}}": sh_toolchain.path,
4543
"{{BASH_RLOCATION_FN}}": BASH_RLOCATION_FUNCTION,
4644
"{{INTERPRETER_FLAGS}}": " ".join(py_toolchain.flags),
4745
"{{VENV_TOOL}}": to_rlocation_path(ctx, venv_toolchain.bin),

py/private/run.tmpl.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!{{SHELL_BIN}}
1+
#!/usr/bin/env bash
2+
# NB: we don't use a path from @bazel_tools//tools/sh:toolchain_type because that's configured for the exec
3+
# configuration, while this script executes in the target configuration at runtime.
24

35
{{BASH_RLOCATION_FN}}
46
runfiles_export_envvars

py/private/venv.tmpl.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!{{SHELL_BIN}}
1+
#!/usr/bin/env bash
2+
# NB: we don't use a path from @bazel_tools//tools/sh:toolchain_type because that's configured for the exec
3+
# configuration, while this script executes in the target configuration at runtime.
24

35
{{BASH_RLOCATION_FN}}
46
runfiles_export_envvars

0 commit comments

Comments
 (0)