diff --git a/.chip-banner.txt b/.chip-banner.txt deleted file mode 100644 index b67eb7d33e978c..00000000000000 --- a/.chip-banner.txt +++ /dev/null @@ -1,6 +0,0 @@ - ▄███▒ ░▓█ ░▓█ ░▓█▓ ▒█████▄ - ██▒ ▀█▒ ▒█ ▒█ ░█▒ ▒█░ █░ - █▓░ ▒██████ ░█▒ ▒█▄▄▄█░ - ▓█ █▒ ▒█ ▒█ ░█░ ▒█▀ - ░▓███▀ ░▓███░▓█▒ ░█░ ▒█ - diff --git a/scripts/activate.sh b/scripts/activate.sh deleted file mode 100644 index 84a9fd73243eac..00000000000000 --- a/scripts/activate.sh +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (c) 2020 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. -# - -if [[ -n ${BASH_SOURCE[0]} ]]; then - CHIP_ROOT=$(cd "${BASH_SOURCE[0]%/*}/.." && pwd) -else - CHIP_ROOT=$(cd "${0%/*}/.." && pwd) -fi - -export PW_BRANDING_BANNER="$CHIP_ROOT/.chip-banner.txt" -export PW_BRANDING_BANNER_COLOR="bold_white" -export PW_VIRTUALENV_REQUIREMENTS="$CHIP_ROOT/scripts/requirements.txt" - -export PW_VIRTUALENV_SETUP_PY_ROOTS="$CHIP_ROOT/integrations/mobly" - -# shellcheck source=/dev/null -source "$CHIP_ROOT/third_party/pigweed/repo/activate.sh" - -#TODO - remove this once native python building is solved for -# psutil (one of mobly's dependencies which CHIP does -# not actually need, so --no-deps is OK) -pip install --no-deps portpicker mobly diff --git a/scripts/activate.sh b/scripts/activate.sh new file mode 120000 index 00000000000000..eba538975a899f --- /dev/null +++ b/scripts/activate.sh @@ -0,0 +1 @@ +bootstrap.sh \ No newline at end of file diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 497e2fb614396d..a02dd05596f5a9 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -14,28 +14,76 @@ # limitations under the License. # -if [[ -n ${BASH_SOURCE[0]} ]]; then - CHIP_ROOT=$(cd "${BASH_SOURCE[0]%/*}/.." && pwd) -else - CHIP_ROOT=$(cd "${0%/*}/.." && pwd) -fi +_bootstrap_or_activate() { + if [ -n "$BASH" ]; then + local _BOOTSTRAP_PATH="${BASH_SOURCE[0]}" + else + local _BOOTSTRAP_PATH="$1" + fi -export PW_BRANDING_BANNER="$CHIP_ROOT/.chip-banner.txt" -export PW_BRANDING_BANNER_COLOR="bold_white" -export PW_VIRTUALENV_REQUIREMENTS="$CHIP_ROOT/scripts/requirements.txt" + local _BOOTSTRAP_NAME="${_BOOTSTRAP_PATH##*/}" + local _CHIP_ROOT="$(cd "${_BOOTSTRAP_PATH%/*}/.." && pwd)" -if test -f "$CHIP_ROOT/scripts/helpers/rename_submodules.sh"; then - "$CHIP_ROOT/scripts/helpers/rename_submodules.sh" -fi + if [ "$_BOOTSTRAP_NAME" = "bootstrap.sh" ] || + [ ! -f "$_CHIP_ROOT/third_party/pigweed/repo/pw_env_setup/util.sh" ]; then + git submodule update --init + fi -git submodule update --init + local _CHIP_BANNER="$( + cat <=2.24.0 # device controller wheel package wheel>=0.34.2 + +# mobly tests +portpicker +mobly diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 5052a3d32fabaa..e24f14fe738d9f 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -9,17 +9,22 @@ cffi==1.14.3 # via cryptography chardet==3.0.4 # via requests click==7.1.2 # via -r requirements.in, pip-tools cryptography==3.1.1 # via -r requirements.in -future==0.18.2 # via -r requirements.in +future==0.18.2 # via -r requirements.in, mobly idna==2.10 # via requests +mobly==1.10 # via -r requirements.in pip-tools==5.3.1 # via -r requirements.in +portpicker==1.3.1 # via -r requirements.in, mobly +psutil==5.7.2 # via mobly pycparser==2.20 # via cffi pyelftools==0.26 # via -r requirements.in pyparsing==2.3.1 # via -r requirements.in -pyserial==3.4 # via -r requirements.in +pyserial==3.4 # via -r requirements.in, mobly +pyyaml==5.3.1 # via mobly requests==2.24.0 # via -r requirements.in six==1.15.0 # via cryptography, pip-tools -wheel==0.34.2 # via -r requirements.in +timeout-decorator==0.4.1 # via mobly urllib3==1.25.10 # via requests +wheel==0.34.2 # via -r requirements.in # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index bb2bc72fcb4936..fa1fc6683cd35a 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit bb2bc72fcb4936e9a7ca016870d784aa7937d43c +Subproject commit fa1fc6683cd35a9f26feeb3cc92a12a77ed2e134