Philipp Schrader | f198a15 | 2021-12-05 09:18:23 -0800 | [diff] [blame] | 1 | load("@rules_python//python:defs.bzl", "py_runtime_pair") |
| 2 | |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 3 | py_runtime( |
Philipp Schrader | f198a15 | 2021-12-05 09:18:23 -0800 | [diff] [blame] | 4 | name = "python3_runtime", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 5 | files = [ |
| 6 | "runtime_binary.sh", |
| 7 | "@python_repo//:all_files", |
| 8 | ], |
| 9 | interpreter = "runtime_binary.sh", |
Philipp Schrader | f198a15 | 2021-12-05 09:18:23 -0800 | [diff] [blame] | 10 | python_version = "PY3", |
| 11 | ) |
| 12 | |
| 13 | py_runtime_pair( |
| 14 | name = "py_runtime", |
| 15 | py2_runtime = None, |
| 16 | py3_runtime = ":python3_runtime", |
| 17 | ) |
| 18 | |
| 19 | toolchain( |
| 20 | name = "python_toolchain", |
Philipp Schrader | 37fdbb6 | 2021-12-18 00:30:37 -0800 | [diff] [blame^] | 21 | exec_compatible_with = [ |
Philipp Schrader | f198a15 | 2021-12-05 09:18:23 -0800 | [diff] [blame] | 22 | "@platforms//cpu:x86_64", |
| 23 | "@platforms//os:linux", |
| 24 | ], |
Philipp Schrader | 37fdbb6 | 2021-12-18 00:30:37 -0800 | [diff] [blame^] | 25 | target_compatible_with = [ |
Philipp Schrader | f198a15 | 2021-12-05 09:18:23 -0800 | [diff] [blame] | 26 | "@platforms//cpu:x86_64", |
| 27 | "@platforms//os:linux", |
| 28 | ], |
| 29 | toolchain = ":py_runtime", |
| 30 | toolchain_type = "@rules_python//python:toolchain_type", |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 31 | ) |