| # Copyright 2017 The Bazel Authors. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| load("@bazel_skylib//rules:common_settings.bzl", "string_list_flag") | |
| load("//python/private:distribution_filegroup.bzl", "distribution_filegroup") # buildifier: disable=bzl-visibility | |
| load("//python/private:py_interpreter_program.bzl", "py_interpreter_program") # buildifier: disable=bzl-visibility | |
| load("//python/private:visibility.bzl", "NOT_ACTUALLY_PUBLIC") # buildifier: disable=bzl-visibility | |
| package(default_visibility = ["//:__subpackages__"]) | |
| distribution_filegroup( | |
| name = "distribution", | |
| ) | |
| py_interpreter_program( | |
| name = "precompiler", | |
| execution_requirements = ":execution_requirements", | |
| main = "precompiler.py", | |
| # Not actually public. Only public so rules_python-generated toolchains | |
| # are able to reference it. | |
| visibility = NOT_ACTUALLY_PUBLIC, | |
| ) | |
| string_list_flag( | |
| name = "execution_requirements", | |
| build_setting_default = [ | |
| "supports-workers=1", | |
| "requires-worker-protocol=json", | |
| "supports-multiplex-sandboxing=1", | |
| "supports-multiplex-workers=1", | |
| "supports-worker-cancellation=1", | |
| ], | |
| ) |