From 2f57e8e4069ffe4e2e6a09546078a24e479966a6 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 2 Dec 2023 18:27:20 +1100 Subject: [PATCH 1/2] .github: clamp empy to version 3 API and syntax hanges make 4 problematic --- .github/workflows/cygwin_build.yml | 2 +- .github/workflows/esp32_build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cygwin_build.yml b/.github/workflows/cygwin_build.yml index 9ae7ffba31fac..f836b9c09a923 100644 --- a/.github/workflows/cygwin_build.yml +++ b/.github/workflows/cygwin_build.yml @@ -189,7 +189,7 @@ jobs: shell: C:\cygwin\bin\bash.exe -eo pipefail '{0}' run: >- ln -sf /usr/bin/python3.7 /usr/bin/python && ln -sf /usr/bin/pip3.7 /usr/bin/pip && - python -m pip install --progress-bar off empy pexpect && + python -m pip install --progress-bar off empy==3.3.4 pexpect && python -m pip install --progress-bar off dronecan --upgrade && cp /usr/bin/ccache /usr/local/bin/ && cd /usr/local/bin && ln -s ccache /usr/local/bin/gcc && diff --git a/.github/workflows/esp32_build.yml b/.github/workflows/esp32_build.yml index c2a438891f7da..47ada972560a4 100644 --- a/.github/workflows/esp32_build.yml +++ b/.github/workflows/esp32_build.yml @@ -200,7 +200,7 @@ jobs: ./install.sh source ./export.sh cd ../.. - python -m pip install --progress-bar off future lxml pymavlink MAVProxy pexpect flake8 geocoder empy dronecan + python -m pip install --progress-bar off future lxml pymavlink MAVProxy pexpect flake8 geocoder empy==3.3.4 dronecan which cmake ./waf configure --board ${{matrix.config}} ./waf plane From 0da78e9ecd80a40f4aeba2ae5732201ae63a55fa Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 3 Dec 2023 11:47:37 +1100 Subject: [PATCH 2/2] Tools: clamp empy to version 3 API and syntax hanges make 4 problematic --- Tools/AP_Periph/wscript | 2 +- Tools/ardupilotwaf/chibios.py | 2 +- Tools/environment_install/install-prereqs-arch.sh | 2 +- Tools/environment_install/install-prereqs-mac.sh | 2 +- Tools/environment_install/install-prereqs-ubuntu.sh | 2 +- .../install-prereqs-windows-andAPMSource.ps1 | 2 +- Tools/environment_install/install-prereqs-windows.ps1 | 2 +- Tools/environment_install/ubuntu-18.04-python3.sh | 2 +- Tools/scripts/configure-ci.sh | 3 +-- 9 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Tools/AP_Periph/wscript b/Tools/AP_Periph/wscript index 8f238ce14b0d5..da728bdcf4e28 100644 --- a/Tools/AP_Periph/wscript +++ b/Tools/AP_Periph/wscript @@ -7,7 +7,7 @@ import sys try: import em except ImportError: - print("you need to install empy with 'python -m pip install empy'") + print("you need to install empy with 'python -m pip install empy==3.3.4'") sys.exit(1) try: diff --git a/Tools/ardupilotwaf/chibios.py b/Tools/ardupilotwaf/chibios.py index 819b3474c540f..a827af26f777f 100644 --- a/Tools/ardupilotwaf/chibios.py +++ b/Tools/ardupilotwaf/chibios.py @@ -114,7 +114,7 @@ def get_full_wsl2_error_msg(self, error_msg): and make sure to add it to your path during the installation. Once installed, run this command in Powershell or Command Prompt to install some packages: - pip.exe install empy pyserial + pip.exe install empy==3.3.4 pyserial **************************************** **************************************** """ % error_msg) diff --git a/Tools/environment_install/install-prereqs-arch.sh b/Tools/environment_install/install-prereqs-arch.sh index 4a1d69b82f9f8..52b94eca23cd6 100755 --- a/Tools/environment_install/install-prereqs-arch.sh +++ b/Tools/environment_install/install-prereqs-arch.sh @@ -26,7 +26,7 @@ BASE_PKGS="base-devel ccache git gsfonts tk wget gcc" SITL_PKGS="python-pip python-setuptools python-wheel python-wxpython opencv python-numpy python-scipy" PX4_PKGS="lib32-glibc zip zlib ncurses" -PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect argparse matplotlib pyparsing geocoder pyserial empy dronecan" +PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect argparse matplotlib pyparsing geocoder pyserial empy==3.3.4 dronecan" # GNU Tools for ARM Embedded Processors # (see https://launchpad.net/gcc-arm-embedded/) diff --git a/Tools/environment_install/install-prereqs-mac.sh b/Tools/environment_install/install-prereqs-mac.sh index 5471e6f175e6e..cba654a6de3d7 100755 --- a/Tools/environment_install/install-prereqs-mac.sh +++ b/Tools/environment_install/install-prereqs-mac.sh @@ -159,7 +159,7 @@ if [[ $DO_AP_STM_ENV -eq 1 ]]; then install_arm_none_eabi_toolchain fi -PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect geocoder flake8 junitparser empy dronecan" +PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect geocoder flake8 junitparser empy==3.3.4 dronecan" # add some Python packages required for commonly-used MAVProxy modules and hex file generation: if [[ $SKIP_AP_EXT_ENV -ne 1 ]]; then PYTHON_PKGS="$PYTHON_PKGS intelhex gnureadline" diff --git a/Tools/environment_install/install-prereqs-ubuntu.sh b/Tools/environment_install/install-prereqs-ubuntu.sh index 6fa833120a0ff..9a865a52c13f9 100755 --- a/Tools/environment_install/install-prereqs-ubuntu.sh +++ b/Tools/environment_install/install-prereqs-ubuntu.sh @@ -152,7 +152,7 @@ fi # Lists of packages to install BASE_PKGS="build-essential ccache g++ gawk git make wget valgrind screen" -PYTHON_PKGS="future lxml pymavlink pyserial MAVProxy pexpect geocoder empy ptyprocess dronecan" +PYTHON_PKGS="future lxml pymavlink pyserial MAVProxy pexpect geocoder empy==3.3.4 ptyprocess dronecan" PYTHON_PKGS="$PYTHON_PKGS flake8 junitparser" # add some Python packages required for commonly-used MAVProxy modules and hex file generation: diff --git a/Tools/environment_install/install-prereqs-windows-andAPMSource.ps1 b/Tools/environment_install/install-prereqs-windows-andAPMSource.ps1 index e1bf9465c4f07..2076ce1f588d6 100644 --- a/Tools/environment_install/install-prereqs-windows-andAPMSource.ps1 +++ b/Tools/environment_install/install-prereqs-windows-andAPMSource.ps1 @@ -19,7 +19,7 @@ Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i - Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'ln -sf /usr/bin/pip3.7 /usr/bin/pip'" Write-Output "Downloading extra Python packages (5/8)" -Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'pip install empy pyserial pymavlink intelhex dronecan pexpect'" +Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'pip install empy==3.3.4 pyserial pymavlink intelhex dronecan pexpect'" Write-Output "Downloading APM source (6/8)" Copy-Item "APM_install.sh" -Destination "C:\cygwin64\home" diff --git a/Tools/environment_install/install-prereqs-windows.ps1 b/Tools/environment_install/install-prereqs-windows.ps1 index 5529c9f0c11dc..15bac628949e8 100644 --- a/Tools/environment_install/install-prereqs-windows.ps1 +++ b/Tools/environment_install/install-prereqs-windows.ps1 @@ -19,7 +19,7 @@ Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i - Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'ln -sf /usr/bin/pip3.7 /usr/bin/pip'" Write-Output "Downloading extra Python packages (5/7)" -Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'pip install empy pyserial pymavlink intelhex dronecan pexpect'" +Start-Process -wait -FilePath "C:\cygwin64\bin\bash" -ArgumentList "--login -i -c 'pip install empy==3.3.4 pyserial pymavlink intelhex dronecan pexpect'" Write-Output "Installing ARM GCC Compiler 10-2020-Q4-Major (6/7)" & $PSScriptRoot\gcc-arm-none-eabi-10-2020-q4-major-win32.exe /S /P /R diff --git a/Tools/environment_install/ubuntu-18.04-python3.sh b/Tools/environment_install/ubuntu-18.04-python3.sh index f8e3ca0685159..a82a4138a4c73 100755 --- a/Tools/environment_install/ubuntu-18.04-python3.sh +++ b/Tools/environment_install/ubuntu-18.04-python3.sh @@ -17,4 +17,4 @@ echo 'export PATH=$HOME/bin:$PATH' >>$HOME/.profile sudo apt install -y python3-wxgtk4.0 python3-opencv python3-matplotlib python3-pip # pip-install python packages (also swiped from install-prereqs-ubuntu.sh): -pip3 install future lxml pymavlink MAVProxy pexpect flake8==3.7.9 requests==2.27.1 monotonic==1.6 geocoder empy configparser==4.0.2 click==7.1.2 decorator==4.4.2 dronecan pygame intelhex empy +pip3 install future lxml pymavlink MAVProxy pexpect flake8==3.7.9 requests==2.27.1 monotonic==1.6 geocoder empy==3.3.4 configparser==4.0.2 click==7.1.2 decorator==4.4.2 dronecan pygame intelhex empy diff --git a/Tools/scripts/configure-ci.sh b/Tools/scripts/configure-ci.sh index e7a4c6a60dd80..a547b729fce17 100755 --- a/Tools/scripts/configure-ci.sh +++ b/Tools/scripts/configure-ci.sh @@ -101,5 +101,4 @@ python -m pip install --progress-bar off --user -U argparse pyserial pexpect fut python -m pip install --progress-bar off --user -U intelhex python -m pip install --progress-bar off --user -U numpy python -m pip install --progress-bar off --user -U edn_format -python -m pip install --progress-bar off --user -U empy - +python -m pip install --progress-bar off --user -U empy==3.3.4