1# Copyright 2023 The Bazel Authors. All rights reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15load("@bazel_skylib//:bzl_library.bzl", "bzl_library") 16load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") 17load("//sphinxdocs/private:sphinx.bzl", "repeated_string_list_flag") 18 19package( 20 default_visibility = ["//:__subpackages__"], 21) 22 23# Additional -D values to add to every Sphinx build. 24# This is usually used to override the version when building 25repeated_string_list_flag( 26 name = "extra_defines", 27 build_setting_default = [], 28) 29 30repeated_string_list_flag( 31 name = "extra_env", 32 build_setting_default = [], 33) 34 35# Whether to add the `-q` arg to Sphinx invocations, which determines if 36# stdout has any output or not (logging INFO messages and progress messages). 37# If true, add `-q`. If false, don't add `-q`. This is mostly useful for 38# debugging invocations or developing extensions. 39bool_flag( 40 name = "quiet", 41 build_setting_default = True, 42) 43 44bzl_library( 45 name = "sphinx_bzl", 46 srcs = ["sphinx.bzl"], 47 deps = ["//sphinxdocs/private:sphinx_bzl"], 48) 49 50bzl_library( 51 name = "sphinx_docs_library_bzl", 52 srcs = ["sphinx_docs_library.bzl"], 53 deps = ["//sphinxdocs/private:sphinx_docs_library_macro_bzl"], 54) 55 56bzl_library( 57 name = "sphinx_stardoc_bzl", 58 srcs = ["sphinx_stardoc.bzl"], 59 deps = ["//sphinxdocs/private:sphinx_stardoc_bzl"], 60) 61 62bzl_library( 63 name = "readthedocs_bzl", 64 srcs = ["readthedocs.bzl"], 65 deps = ["//sphinxdocs/private:readthedocs_bzl"], 66) 67