[Build] Support to use loosen version when failed to install python packages (#14013)

Why I did it
[Build] Support to use loosen version when failed to install python packages
It is to fix the issue #14012

How I did it
Try to use the installation command without constraint

How to verify it
This commit is contained in:
xumia 2023-03-03 15:21:10 +08:00 committed by mssonicbld
parent 1098f6ed4c
commit 850a044726

View File

@ -208,6 +208,11 @@ run_pip_command()
$REAL_COMMAND "${parameters[@]}" $REAL_COMMAND "${parameters[@]}"
local result=$? local result=$?
if [ "$result" != 0 ]; then
echo "Failed to run the command with constraint, try to install with the original command" 1>&2
$REAL_COMMAND "$@"
result=$?
fi
rm $tmp_version_file rm $tmp_version_file
return $result return $result
} }