Skip to content

Commit

Permalink
[python] move BlueZ/CoreBluetooth to chip-repl package (#25055)
Browse files Browse the repository at this point in the history
* [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]>
  • Loading branch information
2 people authored and pull[bot] committed Feb 5, 2024
1 parent 4606f45 commit 8332f61
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/controller/python/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ chip_python_wheel_action("chip-core") {
"chip/ChipBleUtility.py",
"chip/ChipBluezMgr.py",
"chip/ChipCommissionableNodeCtrl.py",
"chip/ChipCoreBluetoothMgr.py",
"chip/ChipStack.py",
"chip/FabricAdmin.py",
"chip/__init__.py",
Expand Down Expand Up @@ -238,11 +237,7 @@ chip_python_wheel_action("chip-core") {
]

if (chip_controller) {
sources += [
"chip-device-ctrl.py",
"chip-repl.py",
"chip/ChipDeviceCtrl.py",
]
sources += [ "chip/ChipDeviceCtrl.py" ]
} else {
sources += [
"chip/server/__init__.py",
Expand Down Expand Up @@ -306,12 +301,6 @@ chip_python_wheel_action("chip-core") {
"ecdsa",
]

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

if (current_cpu == "x64") {
cpu_tag = "x86_64"
} else if (current_cpu == "arm64" && current_os == "linux") {
Expand Down Expand Up @@ -395,7 +384,11 @@ chip_python_wheel_action("chip-repl") {
py_manifest_files = [
{
src_dir = "."
sources = [ "chip/ChipReplStartup.py" ]
sources = [
"chip/ChipBluezMgr.py",
"chip/ChipCoreBluetoothMgr.py",
"chip/ChipReplStartup.py",
]
sources += py_scripts
},
{
Expand Down Expand Up @@ -424,6 +417,15 @@ chip_python_wheel_action("chip-repl") {
"mobly",
]

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"
Expand Down

0 comments on commit 8332f61

Please sign in to comment.