blob: 9939653adfee7e345def6192891cb62038f0e5f7 [file] [log] [blame]
Philipp Schraderf198a152021-12-05 09:18:23 -08001load("@rules_python//python:defs.bzl", "py_runtime_pair")
2
Brian Silverman6470f442018-08-05 12:08:16 -07003py_runtime(
Philipp Schraderf198a152021-12-05 09:18:23 -08004 name = "python3_runtime",
Brian Silverman6470f442018-08-05 12:08:16 -07005 files = [
6 "runtime_binary.sh",
7 "@python_repo//:all_files",
8 ],
9 interpreter = "runtime_binary.sh",
Philipp Schraderf198a152021-12-05 09:18:23 -080010 python_version = "PY3",
11)
12
13py_runtime_pair(
14 name = "py_runtime",
15 py2_runtime = None,
16 py3_runtime = ":python3_runtime",
17)
18
19toolchain(
20 name = "python_toolchain",
Philipp Schrader37fdbb62021-12-18 00:30:37 -080021 exec_compatible_with = [
Philipp Schraderf198a152021-12-05 09:18:23 -080022 "@platforms//cpu:x86_64",
23 "@platforms//os:linux",
24 ],
Philipp Schrader37fdbb62021-12-18 00:30:37 -080025 target_compatible_with = [
Philipp Schraderf198a152021-12-05 09:18:23 -080026 "@platforms//cpu:x86_64",
27 "@platforms//os:linux",
28 ],
29 toolchain = ":py_runtime",
30 toolchain_type = "@rules_python//python:toolchain_type",
Brian Silverman6470f442018-08-05 12:08:16 -070031)