From 0ead5fc17f495d2f89dbfa80803b981c96fc9119 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Thu, 11 Mar 2021 10:46:31 +0100 Subject: [PATCH] Followup #1 for #5244. Always add 'chip.ble' modules even if ble is natively disabled --- examples/bridge-app/linux/main.cpp | 2 +- examples/lighting-app/linux/main.cpp | 2 +- src/controller/python/BUILD.gn | 22 ++++++---------------- src/controller/python/build-chip-wheel.py | 6 ++---- 4 files changed, 10 insertions(+), 22 deletions(-) diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index fc5d18a6150bdb..7857436a76cc2c 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -168,7 +168,7 @@ int main(int argc, char * argv[]) chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(nullptr); // Use default device name (CHIP-XXXX) -#ifdef CONFIG_NETWORK_BLE +#if CONFIG_NETWORK_LAYER_BLE chip::DeviceLayer::Internal::BLEMgrImpl().ConfigureBle(LinuxDeviceOptions::GetInstance().mBleDevice, false); #endif diff --git a/examples/lighting-app/linux/main.cpp b/examples/lighting-app/linux/main.cpp index 509db8f3ccc874..b34a4bc174634f 100644 --- a/examples/lighting-app/linux/main.cpp +++ b/examples/lighting-app/linux/main.cpp @@ -168,7 +168,7 @@ int main(int argc, char * argv[]) chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(nullptr); // Use default device name (CHIP-XXXX) -#ifdef CONFIG_NETWORK_BLE +#if CONFIG_NETWORK_LAYER_BLE chip::DeviceLayer::Internal::BLEMgrImpl().ConfigureBle(LinuxDeviceOptions::GetInstance().mBleDevice, false); #endif diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 8c42fb16d5a884..3f483339ae4b48 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -100,6 +100,12 @@ pw_python_action("python") { "chip/ChipStack.py", "chip/ChipUtility.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/configuration/__init__.py", "chip/exceptions/__init__.py", "chip/internal/__init__.py", @@ -123,22 +129,6 @@ pw_python_action("python") { }, ] - if (chip_enable_ble) { - _py_manifest_files += [ - { - src_dir = "." - sources = [ - "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", - ] - }, - ] - } - _py_manifest_file = "${target_gen_dir}/${target_name}.py_manifest.json" inputs = [] diff --git a/src/controller/python/build-chip-wheel.py b/src/controller/python/build-chip-wheel.py index cabec7a450ea17..9b038946835c4c 100644 --- a/src/controller/python/build-chip-wheel.py +++ b/src/controller/python/build-chip-wheel.py @@ -126,6 +126,8 @@ def finalize_options(self): # packages=[ 'chip', + 'chip.ble', + 'chip.ble.commissioning', 'chip.configuration', 'chip.exceptions', 'chip.internal', @@ -134,10 +136,6 @@ def finalize_options(self): 'chip.tlv', ] - if os.path.isdir(os.path.join(tmpDir, 'chip', 'ble')): - packages += ['chip.ble'] - packages += ['chip.ble.commissioning'] - # Invoke the setuptools 'bdist_wheel' command to generate a wheel containing # the CHIP python packages, shared libraries and scripts. setup(