blob: 8c2bd469f76cc2cbc1e2f0faabedac059d8db484 [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_license//rules:license.bzl", "license")
load("@rules_python//python:py_library.bzl", "py_library")
load("//build/bazel/platforms:constraints.bzl", "HOST_OS_CONSTRAINTS")
package(default_applicable_licenses = [":license"])
# Bazel-only package license metadata.
# @bazel2gn:skip
license(
name = "license",
license_kinds = ["@rules_license//licenses/spdx:Apache-2.0"],
license_text = "src/LICENSE",
)
# TODO(https://fxbug.dev/570694755): Verify whether portpicker should use target_compatible_with (was not gated by if (is_host) in GN).
py_library(
name = "portpicker",
srcs = [
"src/src/portpicker.py",
"src/src/portserver.py",
],
imports = ["src/src"],
target_compatible_with = HOST_OS_CONSTRAINTS,
visibility = [
"//scripts/debug/zxdb_cli/daemon:__pkg__",
"//scripts/debug/zxdb_cli/tests:__pkg__",
"//scripts/fxtest/python:__pkg__",
"//src/developer/debug/e2e_tests/dap_integration_tests:__pkg__",
"//third_party/mobly:__pkg__",
],
)