Skip to content

Commit 0c365e9

Browse files
committed
Merge commit 'abcc5e9d' into HEAD
2 parents d39a0a1 + abcc5e9 commit 0c365e9

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.github/workflows/create_archive_and_notes.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,28 @@ cat > release_notes.txt << EOF
3737
3838
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
3939
40+
For the user-facing changelog see [here](https://rules-python.readthedocs.io/en/latest/changelog.html#v${TAG//./-})
41+
4042
## Using Bzlmod
4143
4244
Add to your \`MODULE.bazel\` file:
4345
4446
\`\`\`starlark
4547
bazel_dep(name = "rules_python", version = "${TAG}")
4648
47-
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
49+
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
50+
python.toolchain(
51+
python_version = "3.13",
52+
)
4853
54+
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
4955
pip.parse(
50-
hub_name = "pip",
51-
python_version = "3.11",
56+
hub_name = "pypi",
57+
python_version = "3.13",
5258
requirements_lock = "//:requirements_lock.txt",
5359
)
5460
55-
use_repo(pip, "pip")
61+
use_repo(pip, "pypi")
5662
\`\`\`
5763
5864
## Using WORKSPACE

tests/support/sh_py_run_test.bzl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,14 @@ def _py_reconfig_impl(ctx):
9090
default_info.default_runfiles,
9191
),
9292
),
93-
testing.TestEnvironment(
94-
environment = ctx.attr.env,
95-
),
93+
# Inherit the expanded environment from the inner target.
94+
ctx.attr.target[RunEnvironmentInfo],
9695
]
9796

9897
def _make_reconfig_rule(**kwargs):
9998
attrs = {
10099
"bootstrap_impl": attr.string(),
101100
"build_python_zip": attr.string(default = "auto"),
102-
"env": attr.string_dict(),
103101
"extra_toolchains": attr.string_list(
104102
doc = """
105103
Value for the --extra_toolchains flag.
@@ -138,7 +136,6 @@ def py_reconfig_test(*, name, **kwargs):
138136
reconfig_kwargs["bootstrap_impl"] = kwargs.pop("bootstrap_impl", None)
139137
reconfig_kwargs["extra_toolchains"] = kwargs.pop("extra_toolchains", None)
140138
reconfig_kwargs["python_version"] = kwargs.pop("python_version", None)
141-
reconfig_kwargs["env"] = kwargs.get("env")
142139
reconfig_kwargs["target_compatible_with"] = kwargs.get("target_compatible_with")
143140
reconfig_kwargs["python_src"] = kwargs.pop("python_src", None)
144141

@@ -178,7 +175,7 @@ def sh_py_run_test(*, name, sh_src, py_src, **kwargs):
178175

179176
py_binary_kwargs = {
180177
key: kwargs.pop(key)
181-
for key in ("imports", "deps")
178+
for key in ("imports", "deps", "env")
182179
if key in kwargs
183180
}
184181

0 commit comments

Comments
 (0)