Skip to content

Commit 3ad8cbf

Browse files
Make metadata_parser python module wheel buildable within src/python_testing/matter_testing_infrastructure/ (#1)
* Adding metadata buildable wheel to src/python_testing/matter_testing_infrastructure * Update build_python.sh * Delete src/python_testing/matter_testing_infrastructure/build/lib/metadata_parser directory
1 parent 2cbef83 commit 3ad8cbf

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

BUILD.gn

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
6767
"//examples/common/pigweed/rpc_console/py:chip_rpc",
6868
"//integrations/mobly:chip_mobly",
6969
"//scripts/py_matter_yamltests:matter_yamltests",
70-
"//scripts/tests/py:matter_testing_infrastructure",
70+
"//src/python_testing/matter_testing_infrastructure:metadata_parser",
7171
]
7272

7373
pw_python_venv("matter_build_venv") {
@@ -107,8 +107,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
107107
if (chip_enable_python_modules) {
108108
deps = [
109109
"${chip_root}/scripts:matter_yamltests_distribution.wheel",
110-
"${chip_root}/scripts/tests/py:matter_testing_infrastructure.wheel",
111110
"${chip_root}/src/controller/python:chip-repl",
111+
"${chip_root}/src/python_testing/matter_testing_infrastructure:metadata_parser.wheel",
112112
]
113113
if (enable_pylib) {
114114
deps += [ "${chip_root}/src/pybindings/pycontroller" ]
@@ -234,8 +234,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
234234
"//scripts/build:build_examples.tests",
235235
"//scripts/py_matter_idl:matter_idl.tests",
236236
"//scripts/py_matter_yamltests:matter_yamltests.tests",
237-
"//scripts/tests/py:matter_testing_infrastructure.tests",
238237
"//src:tests_run",
238+
"//src/python_testing/matter_testing_infrastructure:metadata_parser.tests",
239239
]
240240

241241
if (current_os == "linux" || current_os == "mac") {

scripts/build_python.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ else
213213
fi
214214

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

218218
if [ -n "$extra_packages" ]; then
219219
WHEEL+=("$extra_packages")

scripts/tests/run_python_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import click
3333
import coloredlogs
3434
from colorama import Fore, Style
35-
from matter_testing_infrastructure.metadata import Metadata, MetadataReader
35+
from metadata_parser.metadata import Metadata, MetadataReader
3636

3737
DEFAULT_CHIP_ROOT = os.path.abspath(
3838
os.path.join(os.path.dirname(__file__), '..', '..'))

scripts/tests/py/BUILD.gn src/python_testing/matter_testing_infrastructure/BUILD.gn

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import("//build_overrides/chip.gni")
1818
import("//build_overrides/pigweed.gni")
1919
import("$dir_pw_build/python.gni")
2020

21-
pw_python_package("matter_testing_infrastructure") {
21+
pw_python_package("metadata_parser") {
2222
setup = [
2323
"setup.py",
2424
"setup.cfg",
@@ -28,9 +28,9 @@ pw_python_package("matter_testing_infrastructure") {
2828
inputs = [ "env_test.yaml" ]
2929

3030
sources = [
31-
"matter_testing_infrastructure/__init__.py",
32-
"matter_testing_infrastructure/metadata.py",
31+
"metadata_parser/__init__.py",
32+
"metadata_parser/metadata.py",
3333
]
3434

35-
tests = [ "matter_testing_infrastructure/test_metadata.py" ]
35+
tests = [ "metadata_parser/test_metadata.py" ]
3636
}

scripts/tests/py/setup.cfg src/python_testing/matter_testing_infrastructure/setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
[metadata]
16-
name = matter_testing_infrastructure
16+
name = metadata_parser
1717
version = 0.0.1
1818
author = Project CHIP Authors
1919
description = Scripts to get metadata (runner arguments) associated with the python_testing scripts

scripts/tests/py/setup.py src/python_testing/matter_testing_infrastructure/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515

16-
"""The matter_testing_infrastructure package."""
16+
"""The metadata_parser package."""
1717

1818
import setuptools # type: ignore
1919

0 commit comments

Comments
 (0)