diff --git a/modules/rules_python/0.22.1/MODULE.bazel b/modules/rules_python/0.22.1/MODULE.bazel new file mode 100644 index 00000000000..0f6df9791d6 --- /dev/null +++ b/modules/rules_python/0.22.1/MODULE.bazel @@ -0,0 +1,60 @@ +module( + name = "rules_python", + version = "0.22.1", + compatibility_level = 1, +) + +bazel_dep(name = "platforms", version = "0.0.4") +bazel_dep(name = "bazel_skylib", version = "1.3.0") + +# Those are loaded only when using py_proto_library +bazel_dep(name = "rules_proto", version = "5.3.0-21.7") +bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf") + +internal_deps = use_extension("@rules_python//python/extensions/private:internal_deps.bzl", "internal_deps") +internal_deps.install() +use_repo( + internal_deps, + "pypi__build", + "pypi__click", + "pypi__colorama", + "pypi__importlib_metadata", + "pypi__installer", + "pypi__more_itertools", + "pypi__packaging", + "pypi__pep517", + "pypi__pip", + "pypi__pip_tools", + "pypi__setuptools", + "pypi__tomli", + "pypi__wheel", + "pypi__zipp", + # coverage_deps managed by running ./tools/update_coverage_deps.py + "pypi__coverage_cp310_aarch64-apple-darwin", + "pypi__coverage_cp310_aarch64-unknown-linux-gnu", + "pypi__coverage_cp310_x86_64-apple-darwin", + "pypi__coverage_cp310_x86_64-unknown-linux-gnu", + "pypi__coverage_cp311_aarch64-unknown-linux-gnu", + "pypi__coverage_cp311_x86_64-apple-darwin", + "pypi__coverage_cp311_x86_64-unknown-linux-gnu", + "pypi__coverage_cp38_aarch64-apple-darwin", + "pypi__coverage_cp38_aarch64-unknown-linux-gnu", + "pypi__coverage_cp38_x86_64-apple-darwin", + "pypi__coverage_cp38_x86_64-unknown-linux-gnu", + "pypi__coverage_cp39_aarch64-apple-darwin", + "pypi__coverage_cp39_aarch64-unknown-linux-gnu", + "pypi__coverage_cp39_x86_64-apple-darwin", + "pypi__coverage_cp39_x86_64-unknown-linux-gnu", +) + +python = use_extension("@rules_python//python/extensions:python.bzl", "python") +use_repo(python, "pythons_hub") + +# Necessary so that some toolchain is available so that the Python rules +# work in some minimal capacity. +# The @bazel_tools repo depends on rules_python, so expects rules_python +# to register a toolchain. @bazel_tools can't register a Python toolchain +# itself because @bazel_tools will typically come sooner in the module +# graph BFS order (it is an implicit dep of every module), and would thus +# override any toolchain rules_python registers. +register_toolchains("@bazel_tools//tools/python:autodetecting_toolchain") diff --git a/modules/rules_python/0.22.1/patches/module_dot_bazel_version.patch b/modules/rules_python/0.22.1/patches/module_dot_bazel_version.patch new file mode 100644 index 00000000000..4a76eccdb05 --- /dev/null +++ b/modules/rules_python/0.22.1/patches/module_dot_bazel_version.patch @@ -0,0 +1,12 @@ +=================================================================== +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -1,7 +1,7 @@ + module( + name = "rules_python", +- version = "0.0.0", ++ version = "0.22.1", + compatibility_level = 1, + ) + + bazel_dep(name = "platforms", version = "0.0.4") diff --git a/modules/rules_python/0.22.1/presubmit.yml b/modules/rules_python/0.22.1/presubmit.yml new file mode 100644 index 00000000000..252df6b3d41 --- /dev/null +++ b/modules/rules_python/0.22.1/presubmit.yml @@ -0,0 +1,24 @@ +# Copyright 2023 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +bcr_test_module: + module_path: "examples/bzlmod" + matrix: + platform: ["debian11", "macos", "ubuntu2004", "windows"] + tasks: + run_tests: + name: "Run test module" + platform: ${{ platform }} + test_targets: + - "//..." diff --git a/modules/rules_python/0.22.1/source.json b/modules/rules_python/0.22.1/source.json new file mode 100644 index 00000000000..3f4c86e5076 --- /dev/null +++ b/modules/rules_python/0.22.1/source.json @@ -0,0 +1,9 @@ +{ + "integrity": "sha256-pWQP3dS+sD6MH95e1xYMC6a9R359BIZhwwwGk2om/WM=", + "strip_prefix": "rules_python-0.22.1", + "url": "https://github.com/bazelbuild/rules_python/releases/download/0.22.1/rules_python-0.22.1.tar.gz", + "patches": { + "module_dot_bazel_version.patch": "sha256-fce6bbz7MzaPV+NRlhl/ZXDVt1bL3FkV+UjCa+oNXME=" + }, + "patch_strip": 1 +} diff --git a/modules/rules_python/metadata.json b/modules/rules_python/metadata.json index f8f6e906bf7..37af64b8014 100644 --- a/modules/rules_python/metadata.json +++ b/modules/rules_python/metadata.json @@ -30,6 +30,7 @@ "0.19.0", "0.20.0", "0.21.0", + "0.21.1", "0.22.0", "0.23.0", "0.23.1",