| # Copyright 2021 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| """Defines repository rule for completing setup of rules_fuchsia. |
| |
| The single exported method registers toolchains and loads python dependencies. |
| |
| This must be called after rules_fuchsia_deps has been called.""" |
| |
| load("@rules_python//python:pip.bzl", "pip_install") |
| |
| def rules_fuchsia_workspace_setup(): |
| native.register_toolchains("@python_runtime//:py3-tc") |
| pip_install( |
| name = "rules_fuchsia_pip_deps", |
| quiet = False, |
| requirements = "@rules_fuchsia//fuchsia/private:pip_requirements.txt", |
| python_interpreter_target = "@python_runtime//:bin/python3", |
| ) |