From 207253abc6ec81112abf0a64a8bf68e227528d64 Mon Sep 17 00:00:00 2001 From: Simon John Date: Tue, 4 Aug 2020 23:19:49 +0100 Subject: Rebased python3 branch with some changes from tuna-f1sh@87d5241 --- tests/script/bootstrap/common.sh | 18 +++++++++--------- tests/script/bootstrap/pip-requirements.txt | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/script/bootstrap') diff --git a/tests/script/bootstrap/common.sh b/tests/script/bootstrap/common.sh index c3cd90e..20c1037 100644 --- a/tests/script/bootstrap/common.sh +++ b/tests/script/bootstrap/common.sh @@ -160,22 +160,22 @@ if [ -z $COMMON_SOURCED ]; then fi fi - if ! command -v python >/dev/null 2>&1; then + if ! command -v python3 >/dev/null 2>&1; then echo "Installing Python..." - _install "python" + _install "python3" fi - if ! command -v pip >/dev/null 2>&1; then + if ! command -v pip3 >/dev/null 2>&1; then echo "Installing Pip..." - if ! command -v easy_install >/dev/null 2>&1; then - _install "python-setuptools" + if ! command -v easy_install3 >/dev/null 2>&1; then + _install "python3-setuptools" fi - if ! command -v easy_install >/dev/null 2>&1; then - die "easy_install not available, can't install pip" + if ! command -v easy_install3 >/dev/null 2>&1; then + die "easy_install3 not available, can't install pip3" fi - $SUDO_CMD easy_install pip + $SUDO_CMD easy_install3 pip3 fi PIP_SUDO_CMD= @@ -184,7 +184,7 @@ if [ -z $COMMON_SOURCED ]; then PIP_SUDO_CMD=$SUDO_CMD fi - $PIP_SUDO_CMD pip install --src dependencies --pre -Ur $BOOTSTRAP_DIR/pip-requirements.txt + $PIP_SUDO_CMD pip3 install --src dependencies --pre -Ur $BOOTSTRAP_DIR/pip-requirements.txt COMMON_SOURCED=1 fi diff --git a/tests/script/bootstrap/pip-requirements.txt b/tests/script/bootstrap/pip-requirements.txt index 8313187..205196f 100644 --- a/tests/script/bootstrap/pip-requirements.txt +++ b/tests/script/bootstrap/pip-requirements.txt @@ -1 +1 @@ -pyserial==2.7 +pyserial==3.4 -- cgit v1.2.3 From bcce50471e264bcd8376b3c277600af629684083 Mon Sep 17 00:00:00 2001 From: John Whittington Date: Thu, 6 Aug 2020 09:23:39 +0200 Subject: add python3 and pip3 to travis yml --- tests/script/bootstrap/common.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tests/script/bootstrap') diff --git a/tests/script/bootstrap/common.sh b/tests/script/bootstrap/common.sh index 20c1037..221dd21 100644 --- a/tests/script/bootstrap/common.sh +++ b/tests/script/bootstrap/common.sh @@ -167,13 +167,7 @@ if [ -z $COMMON_SOURCED ]; then if ! command -v pip3 >/dev/null 2>&1; then echo "Installing Pip..." - if ! command -v easy_install3 >/dev/null 2>&1; then - _install "python3-setuptools" - fi - - if ! command -v easy_install3 >/dev/null 2>&1; then - die "easy_install3 not available, can't install pip3" - fi + _install "python3-pip" $SUDO_CMD easy_install3 pip3 fi -- cgit v1.2.3 From 264f8f604a2c29b7bd66a1e0d11f263db7582702 Mon Sep 17 00:00:00 2001 From: John Whittington Date: Thu, 6 Aug 2020 09:38:07 +0200 Subject: Arduino IDE upto support version and SAMD builds process uses direct downloads. Might be better to move to distribution Arduino install + arduino-cli to install board support in future. --- tests/script/bootstrap/arduino.sh | 8 ++++--- tests/script/bootstrap/samd.sh | 46 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 tests/script/bootstrap/samd.sh (limited to 'tests/script/bootstrap') diff --git a/tests/script/bootstrap/arduino.sh b/tests/script/bootstrap/arduino.sh index 7c2c9ac..371c0ef 100644 --- a/tests/script/bootstrap/arduino.sh +++ b/tests/script/bootstrap/arduino.sh @@ -8,7 +8,8 @@ if [ -z "$ARDUINO_DIR" ] || ! test -e $ARDUINO_DIR || [ $OS == "cygwin" ]; then echo "Installing Arduino..." - ARDUINO_BASENAME="arduino-1.0.6" + ARDUINO_BASENAME="arduino-1.8.11" + if [ $OS == "cygwin" ]; then ARDUINO_FILE="$ARDUINO_BASENAME-windows".zip EXTRACT_COMMAND="unzip -q" @@ -16,8 +17,8 @@ if [ -z "$ARDUINO_DIR" ] || ! test -e $ARDUINO_DIR || [ $OS == "cygwin" ]; then ARDUINO_FILE="$ARDUINO_BASENAME-macosx".zip EXTRACT_COMMAND="unzip -q" else - ARDUINO_FILE="$ARDUINO_BASENAME-linux64".tgz - EXTRACT_COMMAND="tar -xzf" + ARDUINO_FILE="$ARDUINO_BASENAME-linux64".tar.xz + EXTRACT_COMMAND="tar -xf" fi ARDUINO_URL=http://arduino.cc/download.php?f=/$ARDUINO_FILE @@ -33,6 +34,7 @@ if [ -z "$ARDUINO_DIR" ] || ! test -e $ARDUINO_DIR || [ $OS == "cygwin" ]; then then echo "Installing Arduino to local folder..." $EXTRACT_COMMAND $ARDUINO_FILE + mv $ARDUINO_BASENAME arduino echo "Arduino installed" fi diff --git a/tests/script/bootstrap/samd.sh b/tests/script/bootstrap/samd.sh new file mode 100644 index 0000000..fdd50f5 --- /dev/null +++ b/tests/script/bootstrap/samd.sh @@ -0,0 +1,46 @@ +set -e +BOOTSTRAP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +source $BOOTSTRAP_DIR/common.sh + +echo "Installing dependencies for building for the SAMD boards" + +# these extract to dirs without versions... +SAMD_PACKAGE="samd-1.8.6" +CMSIS_PACKAGE="CMSIS-4.5.0" +CMSIS_ATMEL_PACKAGE="CMSIS-Atmel-1.2.0" + +if [ $OS == "mac" ]; then + TOOLCHAIN_PACKAGE="gcc-arm-none-eabi-7-2017-q4-major-mac" +else + TOOLCHAIN_PACKAGE="gcc-arm-none-eabi-7-2017-q4-major-linux" +fi + +ARDUINO_URL=https://downloads.arduino.cc +TOOLCHAIN_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4 + +EXTRACT_COMMAND="tar -xjf" + +_pushd $DEPENDENCIES_FOLDER +if ! test -e $SAMD_PACKAGE +then + echo "Downloading SAMD packages..." + download $ARDUINO_URL/cores/$SAMD_PACKAGE.tar.bz2 $SAMD_PACKAGE.tar.bz2 + download $ARDUINO_URL/$CMSIS_PACKAGE.tar.bz2 $CMSIS_PACKAGE.tar.bz2 + download $ARDUINO_URL/$CMSIS_ATMEL_PACKAGE.tar.bz2 $CMSIS_ATMEL_PACKAGE.tar.bz2 + download $TOOLCHAIN_URL/$TOOLCHAIN_PACKAGE.tar.bz2 $TOOLCHAIN_PACKAGE.tar.bz2 +fi + +if ! test -d $SAMD_PACKAGE +then + echo "Installing packages to local folder..." + $EXTRACT_COMMAND $SAMD_PACKAGE.tar.bz2 + $EXTRACT_COMMAND $CMSIS_PACKAGE.tar.bz2 + $EXTRACT_COMMAND $CMSIS_ATMEL_PACKAGE.tar.bz2 + $EXTRACT_COMMAND $TOOLCHAIN_PACKAGE.tar.bz2 + echo "SAMD support installed" +fi + +_popd + +echo +echo "${bldgreen}SAMD dependencies installed.$txtrst" -- cgit v1.2.3 From bf319c49b7f7ff17e073422a3ba06a701e12f590 Mon Sep 17 00:00:00 2001 From: John Whittington Date: Thu, 6 Aug 2020 19:21:23 +0200 Subject: platform neutral examples and manual cherry-pick merge of https://github.com/alissa-huskey/Arduino-Makefile/tree/test_fixes --- tests/script/bootstrap/common.sh | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/script/bootstrap') diff --git a/tests/script/bootstrap/common.sh b/tests/script/bootstrap/common.sh index 221dd21..2b879b8 100644 --- a/tests/script/bootstrap/common.sh +++ b/tests/script/bootstrap/common.sh @@ -168,8 +168,6 @@ if [ -z $COMMON_SOURCED ]; then if ! command -v pip3 >/dev/null 2>&1; then echo "Installing Pip..." _install "python3-pip" - - $SUDO_CMD easy_install3 pip3 fi PIP_SUDO_CMD= -- cgit v1.2.3