From c72bdd3edc9a76f98c91ab07702546cf6f6472a6 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 29 Jul 2024 13:39:23 +1000 Subject: [PATCH] Tools: install_prereqs_ubuntu.sh: pin setuptools to avoid problems on Focal focal: return Version(version) focal: File "/home/vagrant/.local/lib/python3.8/site-packages/packaging/version.py", line 202, in __init__ focal: raise InvalidVersion(f"Invalid version: '{version}'") focal: packaging.version.InvalidVersion: Invalid version: '1.0.3.linux-x86_64' --- Tools/environment_install/install-prereqs-ubuntu.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tools/environment_install/install-prereqs-ubuntu.sh b/Tools/environment_install/install-prereqs-ubuntu.sh index c1aabcbabba8aa..6d742f991c7ebf 100755 --- a/Tools/environment_install/install-prereqs-ubuntu.sh +++ b/Tools/environment_install/install-prereqs-ubuntu.sh @@ -400,7 +400,11 @@ if [ -n "$PYTHON_VENV_PACKAGE" ]; then fi # try update packaging, setuptools and wheel before installing pip package that may need compilation -$PIP install $PIP_USER_ARGUMENT -U pip packaging setuptools wheel +SETUPTOOLS="setuptools" +if [ ${RELEASE_CODENAME} == 'focal' ]; then + SETUPTOOLS=setuptools-70.3.0 +fi +$PIP install $PIP_USER_ARGUMENT -U pip packaging $SETUPTOOLS wheel if [ "$GITHUB_ACTIONS" == "true" ]; then PIP_USER_ARGUMENT+=" --progress-bar off"