Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the data_model_xmls.gni within matter testing infrastructure for data model python packaging #36499

Merged
merged 3 commits into from
Nov 15, 2024
Merged
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
2 changes: 1 addition & 1 deletion scripts/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ ninja -C "$OUTPUT_ROOT" python_wheels
WHEEL=("$OUTPUT_ROOT"/controller/python/chip*.whl)

# Add the matter_testing_infrastructure wheel
WHEEL+=("$OUTPUT_ROOT"/python/obj/src/python_testing/matter_testing_infrastructure/chip-testing._build_wheel/chip_testing-*.whl)
WHEEL+=("$OUTPUT_ROOT"/obj/src/python_testing/matter_testing_infrastructure/chip-testing._build_wheel/chip_testing*.whl)

if [ "$install_pytest_requirements" = "yes" ]; then
# Add the matter_yamltests_distribution wheel
Expand Down
37 changes: 29 additions & 8 deletions src/python_testing/matter_testing_infrastructure/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,21 @@

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

import("//build_overrides/pigweed.gni")
import("//src/python_testing/matter_testing_infrastructure/data_model_xmls.gni")
import("$dir_pw_build/python.gni")
import("$dir_pw_build/python_dist.gni")

pw_python_package("chip-testing") {
setup = [
"setup.py",
"setup.cfg",
"pyproject.toml",
]
pw_python_package("chip-testing-module") {
generate_setup = {
metadata = {
name = "chip-testing-module"
version = "1.4.0"
author = "Project CHIP Authors"
license_expression = "Apache-2.0" # Consistent license format
url = "https://github.com/project-chip/connectedhomeip"
}
}

inputs = [ "env_test.yaml" ]

Expand All @@ -41,9 +46,25 @@ pw_python_package("chip-testing") {
"chip/testing/taglist_and_topology_test.py",
"chip/testing/tasks.py",
]

tests = [
"chip/testing/test_metadata.py",
"chip/testing/test_tasks.py",
]
}

pw_python_distribution("chip-testing") {
packages = [ ":chip-testing-module" ]

generate_setup_cfg = {
name = "chip-testing"
version = "1.4.0"
include_default_pyproject_file = true
include_extra_files_in_package_data = true
}

# Use the imported data_model_XMLS directly
extra_files = []
foreach(file, data_model_XMLS) {
extra_files += [ "${file} > chip/testing/${file}" ]
}
}
Loading
Loading