| # Copyright 2024 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. | |
| import("//build/python/python_c_extension.gni") | |
| config("python_config") { | |
| defines = [ | |
| "Py_LIMITED_API=0x030b00f0", | |
| "PY_SSIZE_T_CLEAN", | |
| ] | |
| } | |
| source_set("fuchsia_controller_abi") { | |
| sources = [ | |
| "fuchsia_controller_abi/abi.h", | |
| "fuchsia_controller_abi/utils.h", | |
| ] | |
| public = [ | |
| "fuchsia_controller_abi/abi.h", | |
| "fuchsia_controller_abi/utils.h", | |
| ] | |
| # If you need to add include directories, use `public_configs` or `configs` | |
| public_configs = [ | |
| ":fuchsia_controller_abi_config", | |
| ":python_config", | |
| ] | |
| } | |
| config("fuchsia_controller_abi_config") { | |
| include_dirs = [ "." ] | |
| } | |
| python_c_extension("fidl_codec") { | |
| sources = [ | |
| "fidl_codec/decode.cc", | |
| "fidl_codec/decode.h", | |
| "fidl_codec/encode.cc", | |
| "fidl_codec/encode.h", | |
| "fidl_codec/fidl_codec.cc", | |
| "fidl_codec/ir.cc", | |
| "fidl_codec/ir.h", | |
| "fidl_codec/mod.cc", | |
| "fidl_codec/mod.h", | |
| "fidl_codec/object_converter.cc", | |
| "fidl_codec/object_converter.h", | |
| "fidl_codec/python_dict_visitor.cc", | |
| "fidl_codec/python_dict_visitor.h", | |
| "fidl_codec/utils.h", | |
| ] | |
| stubs_root = "fidl_codec" | |
| stubs = [ "__init__.pyi" ] | |
| deps = [ | |
| ":fuchsia_controller_abi", | |
| "//sdk/lib/fidl_base", | |
| "//src/lib/fidl_codec", | |
| "//third_party/rapidjson", | |
| "//zircon/system/public", | |
| ] | |
| public_configs = [ ":python_config" ] | |
| } | |
| python_c_extension("fuchsia_controller_internal") { | |
| sources = [ | |
| "fuchsia_controller_internal/error.cc", | |
| "fuchsia_controller_internal/error.h", | |
| "fuchsia_controller_internal/fuchsia_controller.h", | |
| "fuchsia_controller_internal/fuchsia_controller_py.cc", | |
| "fuchsia_controller_internal/macros.h", | |
| "fuchsia_controller_internal/mod.cc", | |
| "fuchsia_controller_internal/mod.h", | |
| ] | |
| stubs_root = "fuchsia_controller_internal" | |
| stubs = [ "__init__.pyi" ] | |
| deps = [ | |
| ":fuchsia_controller_abi", | |
| "..:lib", | |
| "//sdk/fidl/fuchsia.fdomain:fuchsia.fdomain_cpp", | |
| "//sdk/lib/zircon-assert", | |
| "//src/lib/fidl/rust/fidl", | |
| "//zircon/system/public", | |
| ] | |
| public_configs = [ ":python_config" ] | |
| } |