blob: c77c2e71bd0b556d659d6ebb13b26a790865e584 [file]
# Copyright 2026 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.
load("@rules_python//python:py_library.bzl", "py_library")
load("//build/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS")
load("//build/bazel/rules/host_tests:host_py_test.bzl", "host_py_test")
package(default_applicable_licenses = ["//:license"])
test_suite(
name = "host_tests",
target_compatible_with = HOST_OS_CONSTRAINTS,
tests = [":client_test"],
visibility = ["//src/lib:__pkg__"],
)
py_library(
name = "lib",
srcs = [
"pydap/__init__.py",
"pydap/client.py",
"pydap/dap_types.py",
"pydap/models.py",
],
imports = ["."],
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = [
"//scripts/debug/zxdb_cli/daemon:__pkg__",
"//scripts/debug/zxdb_cli/shared:__pkg__",
"//src/developer/debug/e2e_tests/dap_integration_tests:__pkg__",
"//src/lib/debug/dap/python/zxdb:__pkg__",
],
deps = ["//third_party/pylibs/pydantic"],
)
host_py_test(
name = "client_test",
srcs = ["tests/client_test.py"],
main = "tests/client_test.py",
# In Bazel, unlike GN, Python binaries are not zipped, so pydantic_core's
# DSO stays in runfiles via //third_party/pylibs/pydantic without a
# separate test_data target. Original GN comment:
# Explicitly depend on pydantic-core's test_data. This is to ensure that the
# module's DSO is bundled together with our test so the top-level pydantic
# module loads correctly.
deps = [":lib"],
)