xref: /aosp_15_r20/external/pigweed/pw_docgen/py/BUILD.bazel (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1*61c4878aSAndroid Build Coastguard Worker# Copyright 2024 The Pigweed Authors
2*61c4878aSAndroid Build Coastguard Worker#
3*61c4878aSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4*61c4878aSAndroid Build Coastguard Worker# use this file except in compliance with the License. You may obtain a copy of
5*61c4878aSAndroid Build Coastguard Worker# the License at
6*61c4878aSAndroid Build Coastguard Worker#
7*61c4878aSAndroid Build Coastguard Worker#     https://www.apache.org/licenses/LICENSE-2.0
8*61c4878aSAndroid Build Coastguard Worker#
9*61c4878aSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
10*61c4878aSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11*61c4878aSAndroid Build Coastguard Worker# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12*61c4878aSAndroid Build Coastguard Worker# License for the specific language governing permissions and limitations under
13*61c4878aSAndroid Build Coastguard Worker# the License.
14*61c4878aSAndroid Build Coastguard Worker
15*61c4878aSAndroid Build Coastguard Workerload("@pigweed//pw_build:compatibility.bzl", "incompatible_with_mcu")
16*61c4878aSAndroid Build Coastguard Workerload("@rules_python//python:defs.bzl", "py_library")
17*61c4878aSAndroid Build Coastguard Worker
18*61c4878aSAndroid Build Coastguard Workerpackage(default_visibility = ["//visibility:public"])
19*61c4878aSAndroid Build Coastguard Worker
20*61c4878aSAndroid Build Coastguard Workerpy_library(
21*61c4878aSAndroid Build Coastguard Worker    name = "pw_docgen",
22*61c4878aSAndroid Build Coastguard Worker    srcs = [
23*61c4878aSAndroid Build Coastguard Worker        "pw_docgen/__init__.py",
24*61c4878aSAndroid Build Coastguard Worker        "pw_docgen/sphinx/__init__.py",
25*61c4878aSAndroid Build Coastguard Worker        "pw_docgen/sphinx/bug.py",
26*61c4878aSAndroid Build Coastguard Worker        "pw_docgen/sphinx/google_analytics.py",
27*61c4878aSAndroid Build Coastguard Worker        "pw_docgen/sphinx/kconfig.py",
28*61c4878aSAndroid Build Coastguard Worker        "pw_docgen/sphinx/module_metadata.py",
29*61c4878aSAndroid Build Coastguard Worker        "pw_docgen/sphinx/modules_index.py",
30*61c4878aSAndroid Build Coastguard Worker        "pw_docgen/sphinx/pigweed_live.py",
31*61c4878aSAndroid Build Coastguard Worker        "pw_docgen/sphinx/pw_status_codes.py",
32*61c4878aSAndroid Build Coastguard Worker        "pw_docgen/sphinx/seed_metadata.py",
33*61c4878aSAndroid Build Coastguard Worker    ],
34*61c4878aSAndroid Build Coastguard Worker    # TODO: https://pwbug.dev/371563295 - Remove these data dependencies after
35*61c4878aSAndroid Build Coastguard Worker    # pigweed.dev-specific extensions have been moved out of pw_docgen.
36*61c4878aSAndroid Build Coastguard Worker    data = [
37*61c4878aSAndroid Build Coastguard Worker        "//:PIGWEED_MODULES",
38*61c4878aSAndroid Build Coastguard Worker        "//docs:module_metadata.json",
39*61c4878aSAndroid Build Coastguard Worker        "//docs:module_metadata_schema.json",
40*61c4878aSAndroid Build Coastguard Worker        "//seed:seed_metadata.json",
41*61c4878aSAndroid Build Coastguard Worker        "//seed:seed_metadata_schema.json",
42*61c4878aSAndroid Build Coastguard Worker    ],
43*61c4878aSAndroid Build Coastguard Worker    imports = ["."],
44*61c4878aSAndroid Build Coastguard Worker    target_compatible_with = incompatible_with_mcu(),
45*61c4878aSAndroid Build Coastguard Worker    deps = [
46*61c4878aSAndroid Build Coastguard Worker        "//pw_status/py:pw_status",
47*61c4878aSAndroid Build Coastguard Worker        "@python_packages//jsonschema",
48*61c4878aSAndroid Build Coastguard Worker        "@python_packages//kconfiglib",
49*61c4878aSAndroid Build Coastguard Worker        "@python_packages//pytz",
50*61c4878aSAndroid Build Coastguard Worker        "@python_packages//sphinx",
51*61c4878aSAndroid Build Coastguard Worker        "@rules_python//python/runfiles",
52*61c4878aSAndroid Build Coastguard Worker    ],
53*61c4878aSAndroid Build Coastguard Worker)
54