@@ -22,15 +22,37 @@ load("@tink_py//:tink_py_deps.bzl", "tink_py_deps")
22
22
23
23
tink_py_deps ()
24
24
25
- load ("@rules_python//python:repositories.bzl" , "py_repositories" )
25
+ load ("@pybind11_bazel//:python_configure.bzl" , "python_configure" )
26
+ load ("@rules_python//python:repositories.bzl" , "py_repositories" , "python_register_toolchains" )
26
27
27
28
py_repositories ()
28
29
29
- load ("@tink_py//:tink_py_deps_init.bzl" , "tink_py_deps_init" )
30
+ python_register_toolchains (
31
+ name = "python_3_12" ,
32
+ ignore_root_user_error = True ,
33
+ python_version = "3.12" ,
34
+ )
35
+
36
+ load ("@tink_cc//:tink_cc_deps.bzl" , "tink_cc_deps" )
37
+ tink_cc_deps ()
38
+ load ("@tink_cc//:tink_cc_deps_init.bzl" , "tink_cc_deps_init" )
39
+ tink_cc_deps_init ()
40
+
41
+ load ("@rules_python//python:pip.bzl" , "pip_parse" )
42
+
43
+ pip_parse (
44
+ name = "tink_py_pip_deps" ,
45
+ quiet = False ,
46
+ requirements_lock = "@tink_py//:requirements_all.txt" ,
47
+ )
30
48
31
- tink_py_deps_init ("tink_py" )
49
+ # Use `which python3` by default [1] unless PYTHON_BIN_PATH is specified [2].
50
+ #
51
+ # [1] https://github.com/pybind/pybind11_bazel/blob/fc56ce8a8b51e3dd941139d329b63ccfea1d304b/python_configure.bzl#L434
52
+ # [2] https://github.com/pybind/pybind11_bazel/blob/fc56ce8a8b51e3dd941139d329b63ccfea1d304b/python_configure.bzl#L162
53
+ python_configure (name = "local_config_python" , python_version = "3" )
32
54
33
- load ("@tink_py_pip_deps//:requirements.bzl" , tink_py_install_pypi_deps = "install_deps" )
55
+ load ("@tink_py_pip_deps//:requirements.bzl" , tink_py_install_pypi_deps = "install_deps" )
34
56
35
57
tink_py_install_pypi_deps ()
36
58
@@ -43,6 +65,6 @@ pip_parse(
43
65
requirements_lock = "@examples_python//:requirements.txt" ,
44
66
)
45
67
46
- load ("@pip_deps//:requirements.bzl" , tink_py_example_install_pypi_deps = "install_deps" )
68
+ load ("@pip_deps//:requirements.bzl" , tink_py_example_install_pypi_deps = "install_deps" )
47
69
48
70
tink_py_example_install_pypi_deps ()
0 commit comments