Skip to content

Commit c5cd853

Browse files
Update dependency rules_python to v2 (#100)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [rules_python](https://redirect.github.com/bazel-contrib/rules_python) | bazel_dep | major | `1.9.0` → `2.0.0` | --- ### Release Notes <details> <summary>bazel-contrib/rules_python (rules_python)</summary> ### [`v2.0.0`](https://redirect.github.com/bazel-contrib/rules_python/blob/HEAD/CHANGELOG.md#200---2026-04-09) [Compare Source](https://redirect.github.com/bazel-contrib/rules_python/compare/1.9.0...2.0.0) [2.0.0]: https://redirect.github.com/bazel-contrib/rules_python/releases/tag/2.0.0 {#v2-0-0-removed} ##### Removed - Nothing removed. {#v2-0-0-changed} ##### Changed **Breaking** - {obj}`--windows_enable_symlinks` is required. Add `startup --windows_enable_symlinks` to your `.bazelrc` to enable Bazel using full symlink support on Windows. - venv-based binaries are created by default ({obj}`--bootstrap_impl=system_python`) on supported platforms (Linux/Mac with Bazel 8+, or Windows). - `--build_python_zip` on Windows is ignored. Use {obj}`py_zipapp_binary` to create zips of Python programs. - (pypi) Previously `experimental_index_url` users would not need to specify target platforms if cross-building is required. From now we will only pull wheels for the host OS to better align with how the rules work with the legacy `pip` implementation. Use {obj}`pip.parse.target_platforms` to customize the behavior. Related to [#&#8203;260](https://redirect.github.com/bazel-contrib/rules_python/issues/260). Other changes: - (pypi) Update dependencies used for `compile_pip_requirements`, building sdists in the `whl_library` rule and fetching wheels using `pip`. - (pypi) Before using the bazel downloader to fetch the PyPI package metadata we will from now on fetch the lists of available packages on each index. The used package mappings will be written as facts to the `MODULE.bazel.lock` file on supported bazel versions and it should be done at most once. As a result, per-package {obj}`experimental_index_url_overrides` is no longer needed, but if specified, it needs to be provided for all packages not on the default index. What is more, the flags for `--index_url` and `--extra-index-url` now behave in the same way as in `uv` or `pip`, i.e. we default to `--index-url` if the package is not found in `--extra-index-url`. Fixes ([#&#8203;3260](https://redirect.github.com/bazel-contrib/rules_python/issues/3260) and [#&#8203;2632](https://redirect.github.com/bazel-contrib/rules_python/issues/2632)). - (uv) We will now use the download URL specified in the `uv`'s `dist_manifest.json` file. If you have redirects or blocking rules as part of your downloader setup, you may need to adjust them. What is more, the default uv version has been bumped `0.11.2`. - (runfiles): Type annotations are no longer tested for Python 3.9. - Windows no longer defaults to creating a zip file and extracting it; a symlink-based runfiles tree is created, as on unix-like platforms. {#v2-0-0-fixed} ##### Fixed - (toolchain) Also set Make variables for local toolchains. - (zipapp) Resolve issue passing through compression settings in `py_zippapp_binary` targets ([#&#8203;3646](https://redirect.github.com/bazel-contrib/rules_python/issues/3646)). - (toolchains) The pyc created at runtime in the stdlib should no longer cause the Python runtime repository to be invalidated. The stdlib pyc files *may* be reused in between invocations, depending upon the sandboxing configuration. See the {any}`RULES_PYTHON_PYCACHE_DIR` environment variable for more information. ([#&#8203;3643](https://redirect.github.com/bazel-contrib/rules_python/issues/3643)). - (bootstrap) Fixed incorrect runfiles path construction in bootstrap scripts when binary is defined in another bazel module ([#&#8203;3563](https://redirect.github.com/bazel-contrib/rules_python/issues/3563)). - (bootstrap) Resolve `RUNFILES_DIR` inheritance issues, which lead to a child Python binary incorrectly using it's parent's Python binary environment ([#&#8203;3518](https://redirect.github.com/bazel-contrib/rules_python/issues/3518)). - (uv) Downloads for versions `>=0.10` work again. In order to fix this we had drop support for `powerpc64` platform. People interested in the platform can bring it back via the `uv.default` API. Like: ``` uv.default( compatible_with = [ "@&#8203;platforms//os:linux", "@&#8203;platforms//cpu:ppc", ], platform = "powerpc64-unknown-linux-gnu", ) ``` Fixes [#&#8203;3676](https://redirect.github.com/bazel-contrib/rules_python/issues/3676). - (pypi) Fixes wheel extraction on hosts without python installed, Fixes [#&#8203;3712](https://redirect.github.com/bazel-contrib/rules_python/issues/3712). {#v2-0-0-added} ##### Added - (pypi) Write SimpleAPI contents to the `MODULE.bazel.lock` file if using {obj}`experimental_index_url` which should speed up consecutive initializations and should no longer require the network access if the cache is hydrated. Implements [#&#8203;2731](https://redirect.github.com/bazel-contrib/rules_python/issues/2731). - (pypi) The `--index-url` and `--extra-index-url` is now parsed from the lock file and the {obj}`pip.parse.experimental_index_url` and {obj}`pip.parse.experimental_extra_index_urls` is no longer mandatory to leverage the bazel downloader. Implements [#&#8203;1357](https://redirect.github.com/bazel-contrib/rules_python/issues/1357), [#&#8203;2951](https://redirect.github.com/bazel-contrib/rules_python/issues/2951). - (pypi) If cross-compilation is needed, use the {obj}`pip.parse.target_platforms` to specify exactly which platforms should be supported. Implements [#&#8203;260](https://redirect.github.com/bazel-contrib/rules_python/issues/260). - (wheel) Specifying a path ending in `/` as a destination in `data_files` will now install file(s) to a folder, preserving their basename. - Various attributes and fields added to support venvs on Windows: - {obj}`py_runtime.venv_bin_files` and {obj}`PyRuntime.venv_binfiles` field added to specify additional Python runtime files Windows needs for venvs. - {obj}`PyExecutableInfo.venv_interpreter_runfiles`, and {obj}`PyExecutableInfo.venv_interpreter_symlinks` adde - (wheel) Add support for `add_path_prefix` argument in `py_wheel` which can be used to prepend a prefix to the files in the wheel. {#v1-9-0} </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-feature/cpp-sdk-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNDEuMyIsInVwZGF0ZWRJblZlciI6IjQzLjE0MS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 45f0965 commit c5cd853

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module(name = "cpp_sdk_contrib")
22

33
bazel_dep(name = "rules_cc", version = "0.2.18")
4-
bazel_dep(name = "rules_python", version = "1.9.0")
4+
bazel_dep(name = "rules_python", version = "2.0.0")
55
bazel_dep(name = "rules_proto", version = "7.1.0")
66
bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
77
bazel_dep(name = "abseil-cpp", version = "20250814.2")

0 commit comments

Comments
 (0)