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

Fix metadata_parser python module to make it wheel buildable. #34322

Merged
merged 9 commits into from
Jul 26, 2024
4 changes: 3 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
@@ -67,6 +67,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
"//examples/common/pigweed/rpc_console/py:chip_rpc",
"//integrations/mobly:chip_mobly",
"//scripts/py_matter_yamltests:matter_yamltests",
"//src/python_testing/matter_testing_infrastructure:metadata_parser",
]

pw_python_venv("matter_build_venv") {
@@ -107,6 +108,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
deps = [
"${chip_root}/scripts:matter_yamltests_distribution.wheel",
"${chip_root}/src/controller/python:chip-repl",
"${chip_root}/src/python_testing/matter_testing_infrastructure:metadata_parser.wheel",
]
if (enable_pylib) {
deps += [ "${chip_root}/src/pybindings/pycontroller" ]
@@ -232,8 +234,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
"//scripts/build:build_examples.tests",
"//scripts/py_matter_idl:matter_idl.tests",
"//scripts/py_matter_yamltests:matter_yamltests.tests",
"//scripts/tests/py:metadata_parser.tests",
"//src:tests_run",
"//src/python_testing/matter_testing_infrastructure:metadata_parser.tests",
]

if (current_os == "linux" || current_os == "mac") {
3 changes: 3 additions & 0 deletions scripts/build_python.sh
Original file line number Diff line number Diff line change
@@ -212,6 +212,9 @@ else
WHEEL=("$OUTPUT_ROOT"/controller/python/chip*.whl)
fi

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

if [ -n "$extra_packages" ]; then
WHEEL+=("$extra_packages")
fi
2 changes: 1 addition & 1 deletion scripts/tests/run_python_test.py
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@
import click
import coloredlogs
from colorama import Fore, Style
from py.metadata import Metadata, MetadataReader
andy31415 marked this conversation as resolved.
Show resolved Hide resolved
from metadata_parser.metadata import Metadata, MetadataReader

DEFAULT_CHIP_ROOT = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', '..'))
Original file line number Diff line number Diff line change
@@ -28,9 +28,9 @@ pw_python_package("metadata_parser") {
inputs = [ "env_test.yaml" ]

sources = [
"__init__.py",
"metadata.py",
"metadata_parser/__init__.py",
"metadata_parser/metadata.py",
]

tests = [ "test_metadata.py" ]
tests = [ "metadata_parser/test_metadata.py" ]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -16,4 +16,4 @@
name = metadata_parser
version = 0.0.1
author = Project CHIP Authors
description = Scripts to get metadata (runner arguments) associated with the python_testing scripts
description = Scripts to get metadata (runner arguments) associated with the python_testing scripts
File renamed without changes.
Loading