8000 feat: enable rules_python Starlark implemention by default for Bazel … · philsc/rules_python@5cd32ad · GitHub
[go: up one dir, main page]

Skip to content

Commit 5cd32ad

Browse files
authored
feat: enable rules_python Starlark implemention by default for Bazel 7+ (bazel-contrib#1699)
This makes the base rules use the Starlark code in rules_python ("pystar") instead of what is built into Bazel 7. The pystar implementation can be disabled by setting `RULES_PYTHON_ENABLE_PYSTAR=0` in your environment or using `--action_env`. Earlier versions of Bazel continue to use the rules built into Bazel regardless (the new implementation requires special APIs that only Bazel 7 has). Work towards bazel-contrib#1069
1 parent f1d1732 commit 5cd32ad

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ A brief description of the categories of changes:
2727

2828
### Changed
2929

30+
* For Bazel 7, the core rules and providers are now implemented in rules_python
31+
directly and the rules bundled with Bazel are not used. Bazel 6 and earlier
32+
continue to use the Bazel builtin symbols. Of particular note, this means,
33+
under Bazel 7, the builtin global symbol `PyInfo` is **not** the same as what
34+
is loaded from rules_python. The same is true of `PyRuntimeInfo`.
35+
3036
* (toolchains) Windows hosts always ignore pyc files in the downloaded runtimes.
3137
This fixes issues due to pyc files being created at runtime and affecting the
3238
definition of what files were considered part of the runtime.

python/private/internal_config_repo.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ settings for rules to later use.
1919
"""
2020

2121
_ENABLE_PYSTAR_ENVVAR_NAME = "RULES_PYTHON_ENABLE_PYSTAR"
22-
_ENABLE_PYSTAR_DEFAULT = "0"
22+
_ENABLE_PYSTAR_DEFAULT = "1"
2323

2424
_CONFIG_TEMPLATE = """\
2525
config = struct(

0 commit comments

Comments
 (0)
0