diff --git a/BUILD.gn b/BUILD.gn index 884b24fbfcd19d..1d67c2d218cf2c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -53,6 +53,7 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") { "$dir_pw_unit_test/py", "$dir_pw_watch/py", "integrations/mobly:chip_mobly", + "scripts:requirements", "third_party/happy", ] } diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index df57d33f91fc9b..4f0c5faecf824a 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -80,7 +80,7 @@ include(${PIGWEED_ROOT}/pw_protobuf_compiler/proto.cmake) pw_set_backend(pw_log pw_log_basic) pw_set_backend(pw_assert pw_assert_log) pw_set_backend(pw_sys_io pw_sys_io.nrfconnect) -set(dir_pw_third_party_nanopb PRESENT CACHE STRING ${CHIP_ROOT}/third_party/nanopb/repo FORCE) +set(dir_pw_third_party_nanopb "${CHIP_ROOT}/third_party/nanopb/repo" CACHE STRING "" FORCE) add_subdirectory(third_party/connectedhomeip/examples/platform/nrfconnect/pw_sys_io) add_subdirectory(third_party/connectedhomeip/third_party/nanopb/repo) diff --git a/examples/pigweed-app/esp32/main/component.mk b/examples/pigweed-app/esp32/main/component.mk index 8ca53dfdb39fb3..279e11b88d3fb1 100644 --- a/examples/pigweed-app/esp32/main/component.mk +++ b/examples/pigweed-app/esp32/main/component.mk @@ -58,7 +58,9 @@ COMPONENT_ADD_INCLUDEDIRS += ../third_party/connectedhomeip/third_party/pigweed/ ../../../platform/esp32 \ ../../../common/pigweed \ ../../../common/pigweed/esp32 \ - ../build/chip/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos \ + ../build/chip/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb_rpc \ + ../build/chip/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb \ + ../build/chip/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/pwpb \ ../../../../src/lib/support \ COMPONENT_EXTRA_INCLUDES := ${IDF_PATH}/components/freertos/include/freertos/ \ diff --git a/examples/pigweed-app/nrfconnect/CMakeLists.txt b/examples/pigweed-app/nrfconnect/CMakeLists.txt index eaeb2e3b5140e8..26df06b6f58e77 100644 --- a/examples/pigweed-app/nrfconnect/CMakeLists.txt +++ b/examples/pigweed-app/nrfconnect/CMakeLists.txt @@ -39,7 +39,7 @@ include(${PIGWEED_ROOT}/pw_protobuf_compiler/proto.cmake) pw_set_backend(pw_log pw_log_basic) pw_set_backend(pw_assert pw_assert_log) pw_set_backend(pw_sys_io pw_sys_io.nrfconnect) -set(dir_pw_third_party_nanopb PRESENT CACHE STRING ${CHIP_ROOT}/third_party/nanopb/repo FORCE) +set(dir_pw_third_party_nanopb "${CHIP_ROOT}/third_party/nanopb/repo" CACHE STRING "" FORCE) add_subdirectory(third_party/connectedhomeip/examples/platform/nrfconnect/pw_sys_io) add_subdirectory(third_party/connectedhomeip/third_party/nanopb/repo) diff --git a/scripts/BUILD.gn b/scripts/BUILD.gn new file mode 100644 index 00000000000000..3c7080f93c19c1 --- /dev/null +++ b/scripts/BUILD.gn @@ -0,0 +1,21 @@ +# Copyright (c) 2021 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. + +import("//build_overrides/pigweed.gni") + +import("$dir_pw_build/python.gni") + +pw_python_requirements("requirements") { + files = [ "requirements.txt" ] +} diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index cf307c13a42d0c..32356bc9753498 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -24,6 +24,13 @@ _bootstrap_or_activate() { local _BOOTSTRAP_NAME="${_BOOTSTRAP_PATH##*/}" local _CHIP_ROOT="$(cd "${_BOOTSTRAP_PATH%/*}/.." && pwd)" + local _CONFIG_FILE="scripts/environment.json" + + if [ "$_BOOTSTRAP_NAME" = "no_cipd_bootstrap.sh" ]; then + _CONFIG_FILE="scripts/environment_no_cipd.json" + _BOOTSTRAP_NAME="bootstrap.sh" + fi + if [ "$_BOOTSTRAP_NAME" = "bootstrap.sh" ] || [ ! -f "$_CHIP_ROOT/third_party/pigweed/repo/pw_env_setup/util.sh" ]; then git submodule update --init @@ -66,9 +73,7 @@ EOF [ ! -s "$_SETUP_SH" ]; then pw_bootstrap --shell-file "$_SETUP_SH" \ --install-dir "$_PW_ACTUAL_ENVIRONMENT_ROOT" \ - --virtualenv-requirements "$_CHIP_ROOT/scripts/requirements.txt" \ - --cipd-package-file "$_CHIP_ROOT/scripts/pigweed.json" \ - --virtualenv-gn-target "$_CHIP_ROOT#:python_packages.install" + --config-file "$_CHIP_ROOT/$_CONFIG_FILE" pw_finalize bootstrap "$_SETUP_SH" else pw_activate diff --git a/scripts/environment.json b/scripts/environment.json new file mode 100644 index 00000000000000..4c6ef55600b4cd --- /dev/null +++ b/scripts/environment.json @@ -0,0 +1,7 @@ +{ + "cipd_package_files": ["scripts/pigweed.json"], + "virtualenv": { + "gn_root": ".", + "gn_targets": [":python_packages.install"] + } +} diff --git a/scripts/environment_no_cipd.json b/scripts/environment_no_cipd.json new file mode 100644 index 00000000000000..054886430e9787 --- /dev/null +++ b/scripts/environment_no_cipd.json @@ -0,0 +1,6 @@ +{ + "virtualenv": { + "gn_root": ".", + "gn_targets": [":python_packages.install"] + } +} diff --git a/scripts/no_cipd_bootstrap.sh b/scripts/no_cipd_bootstrap.sh new file mode 120000 index 00000000000000..eba538975a899f --- /dev/null +++ b/scripts/no_cipd_bootstrap.sh @@ -0,0 +1 @@ +bootstrap.sh \ No newline at end of file diff --git a/scripts/pigweed.json b/scripts/pigweed.json index e9b369798f62a0..43b710dbb342fa 100644 --- a/scripts/pigweed.json +++ b/scripts/pigweed.json @@ -1,7 +1,7 @@ [ { "path": "gn/gn/${os}-${arch=amd64,arm64}", - "tags": ["git_revision:d7cf6238e07f87b51118f9823a1ec024c1f1932b"] + "tags": ["git_revision:64b3b9401c1c3ed5f3c43c1cac00b91f83597ab8"] }, { "path": "infra/ninja/${os}-${arch=amd64}", @@ -13,8 +13,8 @@ }, { "_comment": "TODO(pwbug/93): Package Bazel for Windows.", - "path": "pigweed/third_party/bazel/${os=linux,mac}-${arch=amd64}", - "tags": ["version:3.2.0"] + "path": "fuchsia/third_party/bazel/${os=linux,mac}-${arch=amd64}", + "tags": ["version:4.0.0"] }, { "path": "pigweed/third_party/bloaty-embedded/${os=linux,mac}-${arch=amd64}", @@ -62,11 +62,11 @@ }, { "path": "pigweed/host_tools/${os}-${arch=amd64}", - "tags": ["git_revision:01145c97424e9158fd9b96b957176de4bb7e8f0c"] + "tags": ["git_revision:2f56efcee3192685898200f6049538ebd809ae36"] }, { - "path": "infra/goma/client/${os}-${arch=amd64}", - "tags": ["git_revision:be1b7f4547023e809b636dc9572c976ccb33dcac"] + "path": "infra/rbe/client/${os=linux,windows}-${arch=amd64}", + "tags": ["git_revision:3b3042c16accd40f0d3f7e40002f9ad2099cfe94"] }, { "path": "fuchsia/third_party/qemu/${os=linux,mac}-${arch}", @@ -81,5 +81,9 @@ "path": "fuchsia/third_party/kythe-libs/${os=linux}-${arch=amd64}", "subdir": "kythe", "tags": ["version:2020-08-05"] + }, + { + "path": "infra/3pp/tools/renode/${os=linux}-${arch=amd64}", + "tags": ["version:2@renode-1.11.0+20210306gite7897c1"] } ] diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index bbe291b3ee01bf..c02188cf65aa03 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit bbe291b3ee01bfec87366b7c45db7656b7a9cd43 +Subproject commit c02188cf65aa03440f575cc24c40b1ae41331e98