# 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/python_wheel.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" ]
}

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/icd/PyChipCheckInDelegate.cpp",
      "chip/icd/PyChipCheckInDelegate.h",
      "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/icd/client:handler",
    "${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/platform/logging:default",
    "${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" ]
}

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/__init__.py",
        "chip/credentials/cert.py",
        "chip/crypto/__init__.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"
}
