| load("@rules_python//python:defs.bzl", "py_runtime_pair") |
| |
| # Python toolchain definition that uses //third_party/nix:python.nix (via |
| # external repository). |
| |
| py_runtime( |
| name = "py3_runtime", |
| interpreter = "@hscloud_nix_python3//:python3", |
| python_version = "PY3", |
| ) |
| |
| py_runtime( |
| name = "py2_runtime", |
| interpreter = "@hscloud_nix_python2//:python2", |
| python_version = "PY2", |
| ) |
| |
| |
| py_runtime_pair( |
| name = "py_runtime_pair", |
| py2_runtime = ":py2_runtime", |
| py3_runtime = ":py3_runtime", |
| ) |
| |
| toolchain( |
| name = "py_toolchain", |
| toolchain = ":py_runtime_pair", |
| toolchain_type = "@rules_python//python:toolchain_type", |
| ) |