[SWDEV-469278] - Lowered PyYAML dependency

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Icfee09b84cf1071ec82b65fc2877be69e0283489


[ROCm/amdsmi commit: 09c9574454]
This commit is contained in:
Maisam Arif
2024-09-20 15:55:32 -05:00
vanhempi 2aa8e8c755
commit 457619bfad
6 muutettua tiedostoa jossa 31 lisäystä ja 15 poistoa
+5 -5
Näytä tiedosto
@@ -149,7 +149,7 @@ do_install_amdsmi_python_lib() {
fi
# upgrade pip if it's an ancient version
# otherwise the amdsmi install will fail
# otherwise amdsmi install will fail
local pip_version
pip_version=$(python3 -m pip --version | grep -Eo '^[^\ ]+ ([0-9]+)' | grep -Eo '[0-9]+$')
if [[ "$pip_version" -lt 19 ]]; then
@@ -158,10 +158,10 @@ do_install_amdsmi_python_lib() {
fi
unset pip_version
# Check PyYAML dependency
# Check PyYAML dependency, typically should not execute
local pyyaml_version
pyyaml_version=$(pip show pyyaml | grep -Po '(?<=Version: )[0-9]')
if [[ "$pyyaml_version" -lt 5 ]]; then
pyyaml_version=$(python3 -m pip show pyyaml | grep -Po '(?<=Version: )[0-9]')
if [[ "$pyyaml_version" -lt 3 ]]; then
echo "Detected ancient pyyaml version ($pyyaml_version)... Upgrading..."
python3 -m pip install 'PyYAML>=5.1' --quiet --disable-pip-version-check --ignore-installed
fi
@@ -169,7 +169,7 @@ do_install_amdsmi_python_lib() {
# install python library at @CPACK_PACKAGING_INSTALL_PREFIX@/@SHARE_INSTALL_PREFIX@/amdsmi
local python_lib_path=@CPACK_PACKAGING_INSTALL_PREFIX@/@SHARE_INSTALL_PREFIX@
python3 -m pip install "$python_lib_path" --quiet --disable-pip-version-check
python3 -m pip install "$python_lib_path" --quiet --disable-pip-version-check --no-build-isolation
export PIP_ROOT_USER_ACTION="$PREVIOUS_PIP_ROOT_USER_ACTION"
export PIP_BREAK_SYSTEM_PACKAGES="$PREVIOUS_PIP_BREAK_SYSTEM_PACKAGES"