Skip to content

Commit 4726305

Browse files
agnersrestyled-commits
authored andcommitted
[python] move BlueZ/CoreBluetooth to chip-repl package (#25055)
* [python] move BlueZ/CoreBluetooth to chip-repl package Move BlueZ and CoreBluetooth classes and its dependencies to the chip-repl package. This removes dependencies from the chip-core wheel and also makes sure that all dependencies are present for BlueZ (including python-dbus). It partially reverts remove unused python-dbus (#23564). * Restyled by gn --------- Co-authored-by: Restyled.io <[email protected]>
1 parent 1e9c563 commit 4726305

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/controller/python/BUILD.gn

+15-13
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ chip_python_wheel_action("chip-core") {
196196
"chip/ChipBleUtility.py",
197197
"chip/ChipBluezMgr.py",
198198
"chip/ChipCommissionableNodeCtrl.py",
199-
"chip/ChipCoreBluetoothMgr.py",
200199
"chip/ChipStack.py",
201200
"chip/FabricAdmin.py",
202201
"chip/__init__.py",
@@ -238,11 +237,7 @@ chip_python_wheel_action("chip-core") {
238237
]
239238

240239
if (chip_controller) {
241-
sources += [
242-
"chip-device-ctrl.py",
243-
"chip-repl.py",
244-
"chip/ChipDeviceCtrl.py",
245-
]
240+
sources += [ "chip/ChipDeviceCtrl.py" ]
246241
} else {
247242
sources += [
248243
"chip/server/__init__.py",
@@ -306,12 +301,6 @@ chip_python_wheel_action("chip-core") {
306301
"ecdsa",
307302
]
308303

309-
if (current_os == "mac") {
310-
py_package_reqs += [ "pyobjc-framework-corebluetooth" ]
311-
} else if (current_os == "linux") {
312-
py_package_reqs += [ "pygobject" ]
313-
}
314-
315304
if (current_cpu == "x64") {
316305
cpu_tag = "x86_64"
317306
} else if (current_cpu == "arm64" && current_os == "linux") {
@@ -395,7 +384,11 @@ chip_python_wheel_action("chip-repl") {
395384
py_manifest_files = [
396385
{
397386
src_dir = "."
398-
sources = [ "chip/ChipReplStartup.py" ]
387+
sources = [
388+
"chip/ChipBluezMgr.py",
389+
"chip/ChipCoreBluetoothMgr.py",
390+
"chip/ChipReplStartup.py",
391+
]
399392
sources += py_scripts
400393
},
401394
{
@@ -424,6 +417,15 @@ chip_python_wheel_action("chip-repl") {
424417
"mobly",
425418
]
426419

420+
if (current_os == "mac") {
421+
py_package_reqs += [ "pyobjc-framework-corebluetooth" ]
422+
} else if (current_os == "linux") {
423+
py_package_reqs += [
424+
"dbus-python==1.2.18",
425+
"pygobject",
426+
]
427+
}
428+
427429
py_package_name = "${chip_python_package_prefix}-repl"
428430
py_package_output = string_replace(py_package_name, "-", "_")
429431
py_platform_tag = "any"

0 commit comments

Comments
 (0)