Futzing with toolchains
This commit is contained in:
parent
0b5912174a
commit
b92d95b80b
2 changed files with 8 additions and 6 deletions
|
@ -35,7 +35,6 @@ bazel_skylib_workspace()
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
# Python support
|
# Python support
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
register_toolchains("//tools/python:toolchain")
|
|
||||||
|
|
||||||
# Using rules_python at a more recent SHA than the last release like a baws
|
# Using rules_python at a more recent SHA than the last release like a baws
|
||||||
git_repository(
|
git_repository(
|
||||||
|
@ -45,6 +44,8 @@ git_repository(
|
||||||
# commit = "...",
|
# commit = "...",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
register_toolchains("//tools/python:python3_toolchain")
|
||||||
|
|
||||||
# pip package pinnings need to be initialized.
|
# pip package pinnings need to be initialized.
|
||||||
# this generates a bunch of bzl rules so that each pip dep is a bzl target
|
# this generates a bunch of bzl rules so that each pip dep is a bzl target
|
||||||
load("@rules_python//python:pip.bzl", "pip_install")
|
load("@rules_python//python:pip.bzl", "pip_install")
|
||||||
|
@ -52,6 +53,7 @@ load("@rules_python//python:pip.bzl", "pip_install")
|
||||||
pip_install(
|
pip_install(
|
||||||
name = "arrdem_source_pypi",
|
name = "arrdem_source_pypi",
|
||||||
requirements = "//tools/python:requirements.txt",
|
requirements = "//tools/python:requirements.txt",
|
||||||
|
python_interpreter = "/usr/bin/python3.9",
|
||||||
)
|
)
|
||||||
|
|
||||||
# git_repository(
|
# git_repository(
|
||||||
|
|
|
@ -13,7 +13,7 @@ exports_files([
|
||||||
])
|
])
|
||||||
|
|
||||||
py_runtime(
|
py_runtime(
|
||||||
name = "python_runtime",
|
name = "python3_runtime",
|
||||||
files = [],
|
files = [],
|
||||||
interpreter_path = "/usr/bin/python3.9",
|
interpreter_path = "/usr/bin/python3.9",
|
||||||
python_version = "PY3",
|
python_version = "PY3",
|
||||||
|
@ -21,14 +21,14 @@ py_runtime(
|
||||||
)
|
)
|
||||||
|
|
||||||
py_runtime_pair(
|
py_runtime_pair(
|
||||||
name = "runtime",
|
name = "python_runtime",
|
||||||
py2_runtime = None,
|
py2_runtime = None,
|
||||||
py3_runtime = ":python_runtime",
|
py3_runtime = ":python3_runtime",
|
||||||
)
|
)
|
||||||
|
|
||||||
toolchain(
|
toolchain(
|
||||||
name = "toolchain",
|
name = "python3_toolchain",
|
||||||
toolchain = ":runtime",
|
toolchain = ":python_runtime",
|
||||||
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
|
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue