Skip to content

Commit 0146ea9

Browse files
authored
Merge branch 'main' into support_python_3.13.1
2 parents fab4d73 + 094a256 commit 0146ea9

File tree

56 files changed

+279
-95
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+279
-95
lines changed

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ examples/bzlmod_build_file_generation/bazel-bzlmod_build_file_generation
2222
examples/multi_python_versions/bazel-multi_python_versions
2323
examples/pip_parse/bazel-pip_parse
2424
examples/pip_parse_vendored/bazel-pip_parse_vendored
25+
examples/pip_repository_annotations/bazel-pip_repository_annotations
2526
examples/py_proto_library/bazel-py_proto_library
2627
tests/integration/compile_pip_requirements/bazel-compile_pip_requirements
2728
tests/integration/ignore_root_user_error/bazel-ignore_root_user_error

MODULE.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ dev_pip.parse(
121121
python_version = "3.11",
122122
requirements_lock = "//docs:requirements.txt",
123123
)
124+
dev_pip.parse(
125+
download_only = True,
126+
experimental_index_url = "https://pypi.org/simple",
127+
hub_name = "dev_pip",
128+
python_version = "3.13.0",
129+
requirements_lock = "//docs:requirements.txt",
130+
)
124131
dev_pip.parse(
125132
download_only = True,
126133
experimental_index_url = "https://pypi.org/simple",

docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Once you've imported the rule set using either Bzlmod or WORKSPACE, you can then
7676
load the core rules in your `BUILD` files with the following:
7777

7878
```starlark
79-
load("@rules_python//python:defs.bzl", "py_binary")
79+
load("@rules_python//python:py_binary.bzl", "py_binary")
8080

8181
py_binary(
8282
name = "main",

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ components have examples in the {gh-path}`examples` directory.
6767
The core rules are currently available in Bazel as built-in symbols, but this
6868
form is deprecated. Instead, you should depend on rules_python in your
6969
`WORKSPACE` or `MODULE.bazel` file and load the Python rules from
70-
`@rules_python//python:defs.bzl` or load paths described in the API documentation.
70+
`@rules_python//python:<name>.bzl` or load paths described in the API documentation.
7171

7272
A [buildifier](https://github.com/bazelbuild/buildtools/blob/master/buildifier/README.md)
7373
fix is available to automatically migrate `BUILD` and `.bzl` files to add the

examples/build_file_generation/BUILD.bazel

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
# ruleset. When the symbol is loaded you can use the rule.
55
load("@bazel_gazelle//:def.bzl", "gazelle")
66
load("@pip//:requirements.bzl", "all_whl_requirements")
7-
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
87
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
8+
load("@rules_python//python:py_binary.bzl", "py_binary")
9+
load("@rules_python//python:py_library.bzl", "py_library")
10+
load("@rules_python//python:py_test.bzl", "py_test")
911
load("@rules_python_gazelle_plugin//manifest:defs.bzl", "gazelle_python_manifest")
1012
load("@rules_python_gazelle_plugin//modules_mapping:def.bzl", "modules_mapping")
1113

examples/build_file_generation/random_number_generator/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
load("@rules_python//python:defs.bzl", "py_library", "py_test")
1+
load("@rules_python//python:py_library.bzl", "py_library")
2+
load("@rules_python//python:py_test.bzl", "py_test")
23

34
py_library(
45
name = "random_number_generator",

examples/bzlmod/BUILD.bazel

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test")
99
load("@pip//:requirements.bzl", "all_data_requirements", "all_requirements", "all_whl_requirements", "requirement")
1010
load("@python_3_9//:defs.bzl", py_test_with_transition = "py_test")
1111
load("@python_versions//3.10:defs.bzl", compile_pip_requirements_3_10 = "compile_pip_requirements")
12-
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
12+
load("@rules_python//python:py_binary.bzl", "py_binary")
13+
load("@rules_python//python:py_library.bzl", "py_library")
14+
load("@rules_python//python:py_test.bzl", "py_test")
1315

1416
# This stanza calls a rule that generates targets for managing pip dependencies
1517
# with pip-compile for a particular python version.

examples/bzlmod/entry_points/tests/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
load("@bazel_skylib//rules:run_binary.bzl", "run_binary")
2-
load("@rules_python//python:defs.bzl", "py_test")
2+
load("@rules_python//python:py_test.bzl", "py_test")
33

44
# Below are targets for testing the `py_console_script_binary` feature and are
55
# not part of the example how to use the feature.

examples/bzlmod/libs/my_lib/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
load("@pip//:requirements.bzl", "requirement")
2-
load("@rules_python//python:defs.bzl", "py_library")
2+
load("@rules_python//python:py_library.bzl", "py_library")
33

44
py_library(
55
name = "my_lib",

examples/bzlmod/other_module/other_module/pkg/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load(
22
"@python_3_11//:defs.bzl",
33
py_binary_311 = "py_binary",
44
)
5-
load("@rules_python//python:defs.bzl", "py_library")
5+
load("@rules_python//python:py_library.bzl", "py_library")
66

77
py_library(
88
name = "lib",

0 commit comments

Comments
 (0)