-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Pigweed's new Python build system (#21202)
This change updates Matter to use Pigweed's new Python build system. This reduces the number of pip installs performed during bootstrap and builds to just a single pigweed package along with any others specified in //BUILD.gn. All python_actions performed duing a GN build do not rely on any pip install of any in-tree python packages including Pigweed ones. Instead build a venv is created in the out directory with only 3rd party deps installed. All Python imports of in-tree packages are accomplished by setting PYTHONPATH for each python_action. This allows scaling up the number of in-tree Python packages without a significant impact to build speed. Bootstrap time is slightly reduced however all Pigweed Python modules are installed allong with the Python packages from: - //examples/common/pigweed/rpc_console - //examples/chef - //integrations/mobly Before: ``` Setting up Python environment.....done (1m34.7s) ``` After: ``` Setting up Python environment.....done (1m14.7s) ```
- Loading branch information
1 parent
c34d922
commit 1190840
Showing
43 changed files
with
403 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 3 additions & 5 deletions
8
build/chip/java/tests/expected_output/child_library_2_expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
{ | ||
"deps_info": { | ||
"name": "child_library_2.json", | ||
"jar_path": "python/lib/build/chip/java/tests/child_library_2.jar", | ||
"deps_configs": [ | ||
"python/gen/build/chip/java/tests/grandchild_library.json" | ||
], | ||
"deps_jars": ["python/lib/build/chip/java/tests/grandchild_library.jar"] | ||
"jar_path": "lib/build/chip/java/tests/child_library_2.jar", | ||
"deps_configs": ["gen/build/chip/java/tests/grandchild_library.json"], | ||
"deps_jars": ["lib/build/chip/java/tests/grandchild_library.jar"] | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
build/chip/java/tests/expected_output/child_library_expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
build/chip/java/tests/expected_output/child_prebuilt_expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
build/chip/java/tests/expected_output/grandchild_library_expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
build/chip/java/tests/expected_output/java_library_expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
{ | ||
"deps_info": { | ||
"name": "java_library.json", | ||
"jar_path": "python/lib/build/chip/java/tests/java_library.jar", | ||
"jar_path": "lib/build/chip/java/tests/java_library.jar", | ||
"deps_configs": [ | ||
"python/gen/build/chip/java/tests/child_library.json", | ||
"python/gen/build/chip/java/tests/child_library_2.json", | ||
"python/gen/build/chip/java/tests/java_prebuilt.json" | ||
"gen/build/chip/java/tests/child_library.json", | ||
"gen/build/chip/java/tests/child_library_2.json", | ||
"gen/build/chip/java/tests/java_prebuilt.json" | ||
], | ||
"deps_jars": [ | ||
"python/lib/build/chip/java/tests/child_library.jar", | ||
"python/lib/build/chip/java/tests/child_library_2.jar", | ||
"python/lib/build/chip/java/tests/grandchild_library.jar", | ||
"python/lib/build/chip/java/tests/prebuilt_jar.jar", | ||
"python/lib/build/chip/java/tests/child_jar.jar" | ||
"lib/build/chip/java/tests/child_library.jar", | ||
"lib/build/chip/java/tests/child_library_2.jar", | ||
"lib/build/chip/java/tests/grandchild_library.jar", | ||
"lib/build/chip/java/tests/prebuilt_jar.jar", | ||
"lib/build/chip/java/tests/child_jar.jar" | ||
] | ||
} | ||
} |
8 changes: 3 additions & 5 deletions
8
build/chip/java/tests/expected_output/java_prebuilt_expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
{ | ||
"deps_info": { | ||
"name": "java_prebuilt.json", | ||
"jar_path": "python/lib/build/chip/java/tests/prebuilt_jar.jar", | ||
"deps_configs": [ | ||
"python/gen/build/chip/java/tests/child_prebuilt.json" | ||
], | ||
"deps_jars": ["python/lib/build/chip/java/tests/child_jar.jar"] | ||
"jar_path": "lib/build/chip/java/tests/prebuilt_jar.jar", | ||
"deps_configs": ["gen/build/chip/java/tests/child_prebuilt.json"], | ||
"deps_jars": ["lib/build/chip/java/tests/child_jar.jar"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) 2022 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
[build-system] | ||
requires = ['setuptools', 'wheel'] | ||
build-backend = 'setuptools.build_meta' |
Oops, something went wrong.