# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")

import("$dir_pw_build/python.gni")

import("${chip_root}/build/chip/tools.gni")
import("${chip_root}/src/platform/python.gni")
import("${chip_root}/src/system/system.gni")
import("${dir_pw_unit_test}/test.gni")

if (current_os == "mac") {
  import("${build_root}/config/mac/mac_sdk.gni")
}

config("controller_wno_deprecate") {
  cflags = [ "-Wno-deprecated-declarations" ]
}

declare_args() {
  chip_python_version = "0.0"
  chip_python_package_prefix = "chip"
  chip_python_supports_stack_locking = chip_system_config_locking != "none"
}

shared_library("ChipDeviceCtrl") {
  if (chip_controller) {
    output_name = "_ChipDeviceCtrl"
  } else {
    output_name = "_ChipServer"
  }
  output_dir = "${target_out_dir}/chip"
  include_dirs = [ "." ]

  sources = [
    "chip/setup_payload/Generator.cpp",
    "chip/setup_payload/Parser.cpp",
  ]

  sources += [ "chip/native/CommonStackInit.cpp" ]

  defines = []

  if (chip_controller) {
    sources += [
      "ChipCommissionableNodeController-ScriptBinding.cpp",
      "ChipDeviceController-Discovery.cpp",
      "ChipDeviceController-IssueNocChain.cpp",
      "ChipDeviceController-ScriptBinding.cpp",
      "ChipDeviceController-ScriptDevicePairingDelegate.cpp",
      "ChipDeviceController-ScriptDevicePairingDelegate.h",
      "ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.cpp",
      "ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.h",
      "ChipDeviceController-StorageDelegate.cpp",
      "ChipDeviceController-StorageDelegate.h",
      "OpCredsBinding.cpp",
      "chip/clusters/attribute.cpp",
      "chip/clusters/command.cpp",
      "chip/commissioning/PlaceholderOperationalCredentialsIssuer.h",
      "chip/credentials/cert.cpp",
      "chip/credentials/cert.h",
      "chip/crypto/p256keypair.cpp",
      "chip/crypto/p256keypair.h",
      "chip/discovery/NodeResolution.cpp",
      "chip/interaction_model/Delegate.cpp",
      "chip/interaction_model/Delegate.h",
      "chip/internal/ChipThreadWork.cpp",
      "chip/internal/ChipThreadWork.h",
      "chip/internal/CommissionerImpl.cpp",
      "chip/logging/LoggingFilter.cpp",
      "chip/logging/LoggingRedirect.cpp",
      "chip/native/ChipMainLoopWork.h",
      "chip/native/PyChipError.cpp",
      "chip/native/PyChipError.h",
      "chip/tracing/TracingSetup.cpp",
      "chip/utils/DeviceProxyUtils.cpp",
    ]
    defines += [ "CHIP_CONFIG_MAX_GROUPS_PER_FABRIC=50" ]
    defines += [ "CHIP_CONFIG_MAX_GROUP_KEYS_PER_FABRIC=50" ]

    if (chip_python_supports_stack_locking) {
      sources += [ "chip/native/ChipMainLoopWork_StackLock.cpp" ]
    } else {
      sources += [ "chip/native/ChipMainLoopWork_WorkSchedule.cpp" ]
    }
  } else {
    sources += [
      "chip/server/Options.cpp",
      "chip/server/Options.h",
      "chip/server/ServerInit.cpp",
    ]
  }

  if (chip_enable_ble) {
    if (current_os == "linux") {
      sources += [ "chip/ble/LinuxImpl.cpp" ]
    } else if (current_os == "mac") {
      sources += [
        "chip/ble/darwin/AdapterListing.mm",
        "chip/ble/darwin/Scanning.mm",
      ]
      cflags = [ "-fobjc-arc" ]
    } else {
      assert(false, "No BLE implementation available for the current OS.")
    }
  }

  public_deps = [
    "${chip_root}/src/app",
    "${chip_root}/src/app/server",
    "${chip_root}/src/credentials:default_attestation_verifier",
    "${chip_root}/src/lib",
    "${chip_root}/src/lib/core",
    "${chip_root}/src/lib/dnssd",
    "${chip_root}/src/lib/support",
    "${chip_root}/src/platform",
    "${chip_root}/src/setup_payload",
    "${chip_root}/src/transport",
  ]

  if (chip_controller) {
    public_deps += [
      "${chip_root}/src/controller/data_model",
      "${chip_root}/src/credentials:file_attestation_trust_store",
      "${chip_root}/src/lib/support:testing",
      "${chip_root}/src/tracing/json",
      "${chip_root}/src/tracing/perfetto",
      "${chip_root}/src/tracing/perfetto:file_output",
      "${chip_root}/third_party/jsoncpp",
    ]

    deps = [
      "${chip_root}/src/tracing/perfetto:event_storage",
      "${chip_root}/src/tracing/perfetto:simple_initialization",
    ]
  } else {
    public_deps += [ "$chip_data_model" ]
  }

  configs += [ ":controller_wno_deprecate" ]
}

template("chip_python_wheel_action") {
  _dist_dir = "${root_out_dir}/controller/python"

  _py_manifest_file = "${target_gen_dir}/${target_name}.py_manifest.json"

  pw_python_action(target_name) {
    script = "build-chip-wheel.py"
    forward_variables_from(invoker, "*")

    _py_manifest_files_rebased = []
    foreach(_manifest_entry, py_manifest_files) {
      inputs += _manifest_entry.sources
      _py_manifest_files_rebased += [
        {
          src_dir = rebase_path(_manifest_entry.src_dir,
                                get_path_info(_py_manifest_file, "dir"))
          sources =
              rebase_path(_manifest_entry.sources, _manifest_entry.src_dir)
        },
      ]
    }

    if (defined(invoker.py_scripts)) {
      _py_scripts = invoker.py_scripts
    } else {
      _py_scripts = []
    }

    _py_manifest = {
      files = _py_manifest_files_rebased
      packages = py_packages
      scripts = _py_scripts
      package_reqs = py_package_reqs
    }

    write_file(_py_manifest_file, _py_manifest, "json")

    args = [
      "--package_name",
      py_package_name,
      "--build_number",
      chip_python_version,
      "--build_dir",
      rebase_path("${target_gen_dir}/${target_name}.py_build", root_build_dir),
      "--dist_dir",
      rebase_path(_dist_dir, root_build_dir),
      "--manifest",
      rebase_path(_py_manifest_file, root_build_dir),
      "--plat-name",
      py_platform_tag,
    ]

    if (defined(invoker.lib_name)) {
      args += [
        "--lib-name",
        lib_name,
      ]
    }

    outputs = [ "${_dist_dir}/$output_name" ]
  }
}

chip_python_wheel_action("chip-core") {
  py_manifest_files = [
    {
      src_dir = "."
      sources = [
        "chip/CertificateAuthority.py",
        "chip/ChipBleBase.py",
        "chip/ChipBleUtility.py",
        "chip/ChipBluezMgr.py",
        "chip/ChipCommissionableNodeCtrl.py",
        "chip/ChipStack.py",
        "chip/FabricAdmin.py",
        "chip/__init__.py",
        "chip/ble/__init__.py",
        "chip/ble/commissioning/__init__.py",
        "chip/ble/get_adapters.py",
        "chip/ble/library_handle.py",
        "chip/ble/scan_devices.py",
        "chip/ble/types.py",
        "chip/clusters/Attribute.py",
        "chip/clusters/Command.py",
        "chip/clusters/__init__.py",
        "chip/commissioning/__init__.py",
        "chip/commissioning/commissioning_flow_blocks.py",
        "chip/commissioning/pase.py",
        "chip/configuration/__init__.py",
        "chip/credentials/cert.py",
        "chip/crypto/fabric.py",
        "chip/crypto/p256keypair.py",
        "chip/discovery/__init__.py",
        "chip/discovery/library_handle.py",
        "chip/discovery/types.py",
        "chip/exceptions/__init__.py",
        "chip/interaction_model/__init__.py",
        "chip/interaction_model/delegate.py",
        "chip/internal/__init__.py",
        "chip/internal/commissioner.py",
        "chip/internal/thread.py",
        "chip/internal/types.py",
        "chip/logging/__init__.py",
        "chip/logging/library_handle.py",
        "chip/logging/types.py",
        "chip/native/__init__.py",
        "chip/setup_payload/__init__.py",
        "chip/setup_payload/setup_payload.py",
        "chip/storage/__init__.py",
        "chip/tracing/__init__.py",
        "chip/utils/CommissioningBuildingBlocks.py",
        "chip/utils/__init__.py",
        "chip/yaml/__init__.py",
        "chip/yaml/data_model_lookup.py",
        "chip/yaml/errors.py",
        "chip/yaml/format_converter.py",
        "chip/yaml/runner.py",
      ]

      if (chip_controller) {
        sources += [ "chip/ChipDeviceCtrl.py" ]
      } else {
        sources += [ "chip/server/__init__.py" ]
      }
    },
    {
      src_dir = target_out_dir
      if (chip_controller) {
        sources = [ "${target_out_dir}/chip/_ChipDeviceCtrl.so" ]
      } else {
        sources = [ "${target_out_dir}/chip/_ChipServer.so" ]
      }
    },
    {
      src_dir = "//"
      sources = [ "//LICENSE" ]
    },
  ]

  inputs = []

  py_packages = [
    "chip",
    "chip.ble",
    "chip.ble.commissioning",
    "chip.configuration",
    "chip.commissioning",
    "chip.clusters",
    "chip.credentials",
    "chip.crypto",
    "chip.utils",
    "chip.discovery",
    "chip.exceptions",
    "chip.internal",
    "chip.interaction_model",
    "chip.logging",
    "chip.yaml",
    "chip.native",
    "chip.clusters",
    "chip.setup_payload",
    "chip.storage",
    "chip.tracing",
  ]

  if (!chip_controller) {
    py_packages += [ "chip.server" ]
  }

  py_package_reqs = [
    "coloredlogs",
    "construct",
    "dacite",
    "rich",
    "pyyaml",
    "ipdb",
    "deprecation",
    "cryptography",
    "ecdsa",
  ]

  if (current_cpu == "x64") {
    cpu_tag = "x86_64"
  } else if (current_cpu == "arm64" && current_os == "linux") {
    cpu_tag = "aarch64"
  } else if (current_cpu == "arm" && current_os == "linux") {
    cpu_tag = "armv7l"
  } else {
    cpu_tag = current_cpu
  }

  if (current_os == "mac") {
    py_platform_tag = string_replace(
            string_replace(mac_deployment_target, "macos", "macosx."),
            ".",
            "_")
  } else {
    py_platform_tag = current_os
  }

  py_platform_tag = py_platform_tag + "_" + cpu_tag

  tags = "cp37-abi3-" + py_platform_tag

  if (chip_controller) {
    lib_name = "_ChipDeviceCtrl.so"
  } else {
    lib_name = "_ChipServer.so"
  }

  py_package_name = "${chip_python_package_prefix}-core"
  py_package_output = string_replace(py_package_name, "-", "_")

  public_deps = [ ":ChipDeviceCtrl" ]

  output_name = "${py_package_output}-${chip_python_version}-${tags}.whl"
}

chip_python_wheel_action("chip-clusters") {
  py_manifest_files = [
    {
      src_dir = "."
      sources = [
        "chip/ChipUtility.py",
        "chip/clusters/CHIPClusters.py",
        "chip/clusters/ClusterObjects.py",
        "chip/clusters/Objects.py",
        "chip/clusters/TestObjects.py",
        "chip/clusters/Types.py",
        "chip/clusters/enum.py",
        "chip/tlv/__init__.py",
        "chip/tlv/tlvlist.py",
      ]
    },
    {
      src_dir = "//"
      sources = [ "//LICENSE" ]
    },
  ]

  inputs = []

  py_packages = [
    "chip",
    "chip.clusters",
    "chip.tlv",
  ]

  py_package_reqs = [
    "dacite",
    "aenum",
  ]

  py_package_name = "${chip_python_package_prefix}-clusters"
  py_package_output = string_replace(py_package_name, "-", "_")
  py_platform_tag = "any"

  output_name = "${py_package_output}-${chip_python_version}-py3-none-any.whl"
}

chip_python_wheel_action("chip-repl") {
  py_scripts = [ "chip-repl.py" ]

  py_manifest_files = [
    {
      src_dir = "."
      sources = [
        "chip/ChipBluezMgr.py",
        "chip/ChipCoreBluetoothMgr.py",
        "chip/ChipReplStartup.py",
      ]
      sources += py_scripts
    },
    {
      src_dir = "//"
      sources = [ "//LICENSE" ]
    },
  ]

  inputs = []

  py_packages = [ "chip" ]

  py_package_reqs = [
    "coloredlogs",

    #
    # IPython 7.30.0 has a bug which results in the use of await ... failing on some platforms (see https://github.com/ipython/ipython/pull/13269)
    # For now, let's just avoid that version.
    #
    # IPython 8.1.0 has a bug which causes issues: https://github.com/ipython/ipython/issues/13554
    #
    #
    "ipython!=8.1.0",
    "rich",
    "ipykernel",
  ]

  if (current_os == "mac") {
    py_package_reqs += [ "pyobjc-framework-corebluetooth" ]
  } else if (current_os == "linux") {
    py_package_reqs += [
      "dbus-python==1.2.18",
      "pygobject",
    ]
  }

  py_package_name = "${chip_python_package_prefix}-repl"
  py_package_output = string_replace(py_package_name, "-", "_")
  py_platform_tag = "any"

  data_deps = [
    ":chip-clusters",
    ":chip-core",
  ]

  output_name = "${py_package_output}-${chip_python_version}-py3-none-any.whl"
}
