# 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("${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"
}

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/credentials/cert.cpp",
      "chip/crypto/p256keypair.cpp",
      "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/LoggingRedirect.cpp",
      "chip/native/PyChipError.cpp",
      "chip/utils/DeviceProxyUtils.cpp",
    ]
    defines += [ "CHIP_CONFIG_MAX_GROUPS_PER_FABRIC=50" ]
    defines += [ "CHIP_CONFIG_MAX_GROUP_KEYS_PER_FABRIC=50" ]
  } else {
    sources += [
      "chip/server/Options.cpp",
      "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}/third_party/jsoncpp",
    ]
  } 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/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",
          "chip/server/types.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",
  ]

  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-device-ctrl.py",
    "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"
}
