Removed Post Install PyYAML and Pip Upgrades

Signed-off-by: Justin Williams <Justin.Williams@amd.com>
Change-Id: I25f0e8087a212fd29d33a8a40303436279789029
Bu işleme şunda yer alıyor:
Justin Williams
2024-09-25 18:20:23 -05:00
ebeveyn e037cde86b
işleme 807f1e3111
2 değiştirilmiş dosya ile 2 ekleme ve 41 silme
+1 -20
Dosyayı Görüntüle
@@ -133,7 +133,6 @@ do_install_amdsmi_python_lib() {
local PREVIOUS_PIP_BREAK_SYSTEM_PACKAGES="$PIP_BREAK_SYSTEM_PACKAGES"
export PIP_BREAK_SYSTEM_PACKAGES=1
# Remove old python library
local pip_list_output
pip_list_output=$(python3 -m pip list --format=columns --disable-pip-version-check)
@@ -149,27 +148,9 @@ do_install_amdsmi_python_lib() {
return
fi
# upgrade pip if it's an ancient version, typically should not execute
# otherwise the 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
echo "Detected ancient pip version ($pip_version)... Upgrading..."
python3 -m pip install --upgrade pip --quiet --disable-pip-version-check
fi
unset pip_version
# Check PyYAML dependency, typically should not execute
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
unset pyyaml_version
# 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 --no-build-isolation
python3 -m pip install "$python_lib_path" --quiet --disable-pip-version-check --no-build-isolation --no-index
export PIP_ROOT_USER_ACTION="$PREVIOUS_PIP_ROOT_USER_ACTION"
export PIP_BREAK_SYSTEM_PACKAGES="$PREVIOUS_PIP_BREAK_SYSTEM_PACKAGES"
+1 -21
Dosyayı Görüntüle
@@ -148,29 +148,9 @@ do_install_amdsmi_python_lib() {
return
fi
# upgrade pip if it's an ancient version
# 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
echo "Detected ancient pip version ($pip_version)... Upgrading..."
python3 -m pip install --upgrade pip --quiet --disable-pip-version-check
fi
unset pip_version
# Check PyYAML dependency, typically should not execute
local pyyaml_version
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
unset pyyaml_version
# 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 --no-build-isolation
python3 -m pip install "$python_lib_path" --quiet --disable-pip-version-check --no-build-isolation --no-index
export PIP_ROOT_USER_ACTION="$PREVIOUS_PIP_ROOT_USER_ACTION"
export PIP_BREAK_SYSTEM_PACKAGES="$PREVIOUS_PIP_BREAK_SYSTEM_PACKAGES"