Revert "[SWDEV-469278] Lowered PyYAML post install script dependency"
Revert submission 1125402 Reason for revert: Packaging a tar archive of 3rd party sources Reverted Changes: I8908451c0:[SWDEV-482058] Updated Packaging for offline insta... I764c8bf01:[SWDEV-469278] Lowered PyYAML post install script ... Change-Id: I3886b5370e352fc33a249c4657d7ed0c1ee75baf
Этот коммит содержится в:
коммит произвёл
Maisam Arif
родитель
9924574cbe
Коммит
6beec5f3ec
+2
-29
@@ -161,42 +161,15 @@ do_install_amdsmi_python_lib() {
|
||||
# Check PyYAML dependency
|
||||
local pyyaml_version
|
||||
pyyaml_version=$(pip show pyyaml | grep -Po '(?<=Version: )[0-9]')
|
||||
if [[ "$pyyaml_version" -lt 3 ]]; then
|
||||
if [[ "$pyyaml_version" -lt 5 ]]; 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 setuptools wheel (offline install)
|
||||
# Function to find the tarball
|
||||
find_tarball() {
|
||||
find / -name "amdsmi_offline.tar.gz" 2>/dev/null | head -n 1
|
||||
}
|
||||
|
||||
# Locate the tarball
|
||||
tarball_path=$(find_tarball)
|
||||
|
||||
if [ -z "$tarball_path" ]; then
|
||||
echo "Error: amdsmi_offline.tar.gz not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract directory from tarball path
|
||||
base_dir=$(dirname "$tarball_path")
|
||||
|
||||
# Navigate to the directory containing the tarball
|
||||
cd "$base_dir" || exit
|
||||
|
||||
# Unpack the tarball
|
||||
tar -xzvf amdsmi_offline.tar.gz
|
||||
|
||||
# Install setuptools offline (if needed)
|
||||
cd offline_packages || exit
|
||||
python3 -m pip install --upgrade --upgrade-strategy only-if-needed --no-index --find-links=. setuptools
|
||||
|
||||
# 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
|
||||
|
||||
export PIP_ROOT_USER_ACTION="$PREVIOUS_PIP_ROOT_USER_ACTION"
|
||||
export PIP_BREAK_SYSTEM_PACKAGES="$PREVIOUS_PIP_BREAK_SYSTEM_PACKAGES"
|
||||
|
||||
Ссылка в новой задаче
Block a user