Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
deps = [
"${chip_root}/scripts:matter_yamltests_distribution.wheel",
"${chip_root}/scripts/py_matter_yamltests:matter-yamltests.wheel",
"${chip_root}/src/controller/python:matter-core-module.wheel",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

follow up for me - either add all the -core -cluster -repl ones here or remove this line

"${chip_root}/src/controller/python:matter-repl",
"${chip_root}/src/python_testing/matter_testing_infrastructure:matter-testing.wheel",
"${chip_root}/src/python_testing/post_certification_tests:matter-post-certification-tests.wheel",
Expand Down
2 changes: 1 addition & 1 deletion build/chip/python_wheel.gni
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import("$dir_pw_build/python.gni")
import("${chip_root}/src/system/system.gni")

declare_args() {
chip_python_version = "1.0.0"
chip_python_version = "1.5.0"
chip_python_package_prefix = "matter"
chip_python_supports_stack_locking = chip_system_config_locking != "none"
}
Expand Down
60 changes: 60 additions & 0 deletions scripts/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
import("$dir_pw_build/python_dist.gni")

import("${chip_root}/src/controller/flags.gni")

# This target creates a single Python package and wheel for yamltests. It will
# merge all Python dependencies Matter. The output is located in:
# out/obj/scripts/matter_yamltests_distribution/ <- source files here
Expand All @@ -31,3 +33,61 @@ pw_python_distribution("matter_yamltests_distribution") {
append_date_to_version = true
}
}

pw_python_distribution("matter_iot") {
packages = [
"${chip_root}/scripts/py_matter_yamltests:matter-yamltests",
"${chip_root}/scripts/py_matter_idl:matter-idl",
"${chip_root}/src/python_testing/matter_testing_infrastructure:matter-testing-module",
"${chip_root}/src/controller/python:matter-core-module",
"${chip_root}/src/controller/python:matter-clusters-module",
"${chip_root}/src/controller/python:matter-repl-module",
]

generate_setup_cfg = {
name = "matter_iot"
version = "1.5.0.dev1"
include_default_pyproject_file = true
include_extra_files_in_package_data = true
metadata = {
description = "Matter IoT python development controller and test package"
url = "https://github.com/project-chip/connectedhomeip"
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
]
}
}

if (chip_support_commissioning_in_controller) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do? Should python not always look the same (and maybe always be ctrl)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a way to compile the python stuff to support a python-based server. I don't know if anyone is actually using it.

lib_name = "_ChipDeviceCtrl.so"
} else {
lib_name = "_ChipServer.so"
}

public_deps = [ "${chip_root}/src/controller/python:ChipDeviceCtrl" ]
public_deps += [
"${chip_root}/src/python_testing/matter_testing_infrastructure:data_model_zip_1_2",
"${chip_root}/src/python_testing/matter_testing_infrastructure:data_model_zip_1_3",
"${chip_root}/src/python_testing/matter_testing_infrastructure:data_model_zip_1_4",
"${chip_root}/src/python_testing/matter_testing_infrastructure:data_model_zip_1_4_1",
"${chip_root}/src/python_testing/matter_testing_infrastructure:data_model_zip_1_4_2",
"${chip_root}/src/python_testing/matter_testing_infrastructure:data_model_zip_1_5",
]

extra_files = [
"${root_out_dir}/data_model/zip_1_2.zip > matter/testing/data_model/1.2/allfiles.zip",
"${root_out_dir}/data_model/zip_1_3.zip > matter/testing/data_model/1.3/allfiles.zip",
"${root_out_dir}/data_model/zip_1_4.zip > matter/testing/data_model/1.4/allfiles.zip",
"${root_out_dir}/data_model/zip_1_4_1.zip > matter/testing/data_model/1.4.1/allfiles.zip",
"${root_out_dir}/data_model/zip_1_4_2.zip > matter/testing/data_model/1.4.2/allfiles.zip",
"${root_out_dir}/data_model/zip_1_5.zip > matter/testing/data_model/1.5/allfiles.zip",
"${root_out_dir}/obj/src/controller/python/matter/${lib_name} > matter/${lib_name}",
]
}

pw_python_wheels("python_wheel_dist") {
packages = [ ":matter_iot" ]
directory = "$root_out_dir/dist"
}
1 change: 1 addition & 0 deletions scripts/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ fi

# Compile Python wheels
ninja -C "$output_root" python_wheels
ninja -C "$output_root" python_wheel_dist

# Add wheels from matter_python_wheel_action templates.
WHEEL=("$output_root"/controller/python/matter*.whl)
Expand Down
Loading
Loading