WORKSPACE: rules_python->0.13; switch to hermetic interpreter

Change-Id: I0145f9db6a71fa9080b166dd75ff2c1b93e2b241
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1462
Reviewed-by: q3k <q3k@hackerspace.pl>
diff --git a/WORKSPACE b/WORKSPACE
index e2a84d2..055772a 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -18,10 +18,10 @@
 
 protobuf_deps()
 
-rules_python_version = "0.11.0"
+rules_python_version = "0.13.0"
 http_archive(
     name = "rules_python",
-    sha256 = "c03246c11efd49266e8e41e12931090b613e12a59e6f55ba2efd29a7cb8b4258",
+    sha256 = "8c8fe44ef0a9afc256d1e75ad5f448bb59b81aba149b8958f02f7b3a98f5d9b4",
     strip_prefix = "rules_python-{}".format(rules_python_version),
     url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/{}.tar.gz".format(rules_python_version),
 )
@@ -60,15 +60,23 @@
 bazel_skylib_workspace()
 
 # Python rules
+load("@rules_python//python:repositories.bzl", "python_register_toolchains")
+
+python_register_toolchains(
+    name = "python3_10",
+    python_version = "3.10",
+)
+
+load("@python3_10//:defs.bzl", "interpreter")
 load("@rules_python//python:pip.bzl", "pip_parse")
 
 pip_parse(
     name = "pydeps",
+    python_interpreter_target = interpreter,
     requirements_lock = "//third_party/py:requirements.txt",
 )
 
 load("@pydeps//:requirements.bzl", "install_deps")
-
 install_deps()
 
 # Setup Go toolchain.