roll: rules_python

Bug: 258836641
Change-Id: I1cd66aed311424b53a0080477ee95cb6a4383436
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/examples/+/224414
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Austin Foxley <afoxley@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Ted Pudlik <tpudlik@google.com>
diff --git a/.bazelrc b/.bazelrc
index 91934e2..d71ee06 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -32,6 +32,9 @@
 # Required for new toolchain resolution API.
 build --incompatible_enable_cc_toolchain_resolution
 
+# Expose exec toolchains for Python.
+build --@rules_python//python/config_settings:exec_tools_toolchain=enabled
+
 # Default targets to build when running:
 # bazel build --config=presubmit
 build:presubmit -- \
diff --git a/WORKSPACE b/WORKSPACE
index 49be3f3..a8ee90d 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -55,9 +55,9 @@
 
 http_archive(
     name = "rules_python",
-    sha256 = "9acc0944c94adb23fba1c9988b48768b1bacc6583b52a2586895c5b7491e2e31",
-    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",
+    sha256 = "e3f1cc7a04d9b09635afb3130731ed82b5f58eadc8233d4efb59944d92ffc06f",
+    strip_prefix = "rules_python-0.33.2",
+    url = "https://github.com/bazelbuild/rules_python/releases/download/0.33.2/rules_python-0.33.2.tar.gz",
 )
 
 load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel
index e4aac39..23d4dc8 100644
--- a/tools/BUILD.bazel
+++ b/tools/BUILD.bazel
@@ -12,7 +12,7 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-load("@rules_python//python:defs.bzl", "py_binary")
+load("@rules_python//python:defs.bzl", "py_binary", "py_library")
 
 package(default_visibility = ["//visibility:public"])