2
0

[SWDEV-434556] Updated warning text when argcomplete fails to install (#778)

* Solved error: [Errno 2] No such file or directory: '/usr/local/lib/python3.10/dist-packages/argcomplete/bash_completion.d/python-argcomplete.sh'

[ROCm/amdsmi commit: 013d6cb511]
Este cometimento está contido em:
Billakanti, Koushik
2025-10-27 13:05:17 -05:00
cometido por GitHub
ascendente 3924171d74
cometimento a428180cb8
2 ficheiros modificados com 18 adições e 8 eliminações
+9 -4
Ver ficheiro
@@ -176,15 +176,20 @@ do_install_amdsmi_python_lib() {
export PIP_BREAK_SYSTEM_PACKAGES="$PREVIOUS_PIP_BREAK_SYSTEM_PACKAGES"
# only try to activate argcomplete if such command exists
# python3-argcomplete is recommended but optional, we handle its absence gracefully
if command -v activate-global-python-argcomplete &>/dev/null; then
activate-global-python-argcomplete
activate-global-python-argcomplete 2>/dev/null || {
echo "[INFO] Bash completion activation skipped. You can manually enable it with: activate-global-python-argcomplete"
}
else
# try older argcomplete3 version
if command -v activate-global-python-argcomplete3 &>/dev/null; then
activate-global-python-argcomplete3
activate-global-python-argcomplete3 2>/dev/null || {
echo "[INFO] Bash completion activation skipped. You can manually enable it with: activate-global-python-argcomplete3"
}
else
echo "[WARNING] Could not find argcomplete or argcomplete3. "\
"Argument completion will not work..."
echo "[WARNING] Could not find argcomplete activation command. "\
"Argument completion will not work. Install python3-argcomplete package to enable it."
fi
fi
}
+9 -4
Ver ficheiro
@@ -178,15 +178,20 @@ do_install_amdsmi_python_lib() {
export PIP_BREAK_SYSTEM_PACKAGES="$PREVIOUS_PIP_BREAK_SYSTEM_PACKAGES"
# only try to activate argcomplete if such command exists
# python3-argcomplete is recommended but optional, we handle its absence gracefully
if command -v activate-global-python-argcomplete &>/dev/null; then
activate-global-python-argcomplete
activate-global-python-argcomplete 2>/dev/null || {
echo "[INFO] Bash completion activation skipped. You can manually enable it with: activate-global-python-argcomplete"
}
else
# try older argcomplete3 version
if command -v activate-global-python-argcomplete3 &>/dev/null; then
activate-global-python-argcomplete3
activate-global-python-argcomplete3 2>/dev/null || {
echo "[INFO] Bash completion activation skipped. You can manually enable it with: activate-global-python-argcomplete3"
}
else
echo "[WARNING] Could not find argcomplete or argcomplete3. "\
"Argument completion will not work..."
echo "[WARNING] Could not find argcomplete activation command. "\
"Argument completion will not work. Install python3-argcomplete package to enable it."
fi
fi
}