diff --git a/modules/rules_python/0.27.0/MODULE.bazel b/modules/rules_python/0.27.0/MODULE.bazel new file mode 100644 index 00000000000..546713e7dcc --- /dev/null +++ b/modules/rules_python/0.27.0/MODULE.bazel @@ -0,0 +1,69 @@ +module( + name = "rules_python", + version = "0.27.0", + compatibility_level = 1, +) + +bazel_dep(name = "bazel_features", version = "1.1.1") +bazel_dep(name = "bazel_skylib", version = "1.3.0") +bazel_dep(name = "platforms", version = "0.0.4") + +# 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") + +bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc") + +internal_deps = use_extension("@rules_python//python/private/bzlmod:internal_deps.bzl", "internal_deps") +internal_deps.install() +use_repo( + internal_deps, + "rules_python_internal", + # START: maintained by 'bazel run //tools/private:update_pip_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__pyproject_hooks", + "pypi__setuptools", + "pypi__tomli", + "pypi__wheel", + "pypi__zipp", + # END: maintained by 'bazel run //tools/private:update_pip_deps' +) + +# We need to do another use_extension call to expose the "pythons_hub" +# repo. +python = use_extension("@rules_python//python/extensions:python.bzl", "python") + +# The default toolchain to use if nobody configures a toolchain. +# NOTE: This is not a stable version. It is provided for convenience, but will +# change frequently to track the most recent Python version. +# NOTE: The root module can override this. +python.toolchain( + is_default = True, + python_version = "3.11", +) +use_repo(python, "pythons_hub") + +# This call registers the Python toolchains. +register_toolchains("@pythons_hub//:all") + +# ===== DEV ONLY SETUP ===== +docs_pip = use_extension( + "//python/extensions:pip.bzl", + "pip", + dev_dependency = True, +) +docs_pip.parse( + hub_name = "docs_deps", + python_version = "3.11", + requirements_darwin = "//docs/sphinx:requirements_darwin.txt", + requirements_lock = "//docs/sphinx:requirements_linux.txt", +) diff --git a/modules/rules_python/0.27.0/patches/module_dot_bazel_version.patch b/modules/rules_python/0.27.0/patches/module_dot_bazel_version.patch new file mode 100644 index 00000000000..4b57506b036 --- /dev/null +++ b/modules/rules_python/0.27.0/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.27.0", + compatibility_level = 1, + ) + + bazel_dep(name = "bazel_features", version = "1.1.1") diff --git a/modules/rules_python/0.27.0/presubmit.yml b/modules/rules_python/0.27.0/presubmit.yml new file mode 100644 index 00000000000..252df6b3d41 --- /dev/null +++ b/modules/rules_python/0.27.0/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.27.0/source.json b/modules/rules_python/0.27.0/source.json new file mode 100644 index 00000000000..8cfce59a76d --- /dev/null +++ b/modules/rules_python/0.27.0/source.json @@ -0,0 +1,9 @@ +{ + "integrity": "sha256-mswJRMlK2yP7ocmYi0h2ixusxlg7UqJYaJXFt0keLjE=", + "strip_prefix": "rules_python-0.27.0", + "url": "https://github.com/bazelbuild/rules_python/releases/download/0.27.0/rules_python-0.27.0.tar.gz", + "patches": { + "module_dot_bazel_version.patch": "sha256-nMZe7ooA/2mDDiq9XY92JX2FZIsqwlWgNlYVXZmaGpY=" + }, + "patch_strip": 1 +} diff --git a/modules/rules_python/metadata.json b/modules/rules_python/metadata.json index 9a65fd9afda..f36973e2ecf 100644 --- a/modules/rules_python/metadata.json +++ b/modules/rules_python/metadata.json @@ -35,7 +35,8 @@ "0.23.1", "0.24.0", "0.25.0", - "0.26.0" + "0.26.0", + "0.27.0" ], "yanked_versions": { "0.14.0": "rules_python 0.14.0 is broken due to https://github.com/bazelbuild/bazel-central-registry/issues/287, please upgrade to version >= 0.15.0"