install: установка python3.12 из vendor/debs

This commit is contained in:
root
2026-03-11 09:12:15 +00:00
parent 890ed5fc93
commit 8868711783
5 changed files with 28 additions and 3 deletions
+25 -1
View File
@@ -33,7 +33,31 @@ if ! command -v ffmpeg >/dev/null 2>&1; then
NEED_FFMPEG=1
fi
# Пытаемся доустановить xvfb и ffmpeg из vendor/debs, если они отсутствуют
# Пытаемся доустановить Python 3.12, xvfb и ffmpeg из vendor/debs, если они отсутствуют
if [ "$NEED_PYTHON" -eq 1 ]; then
PY_DEB="$(ls "$REPO_ROOT"/vendor/debs/python3.12_[0-9]*.deb 2>/dev/null | head -n1 || true)"
PY_VENV_DEB="$(ls "$REPO_ROOT"/vendor/debs/python3.12-venv_[0-9]*.deb 2>/dev/null | head -n1 || true)"
if [ -n "$PY_DEB" ]; then
echo "python3.12 не найден в системе. Устанавливаю из $PY_DEB ..."
if dpkg -i "$PY_DEB"; then
echo "python3.12 успешно установлен из vendor/debs."
else
echo "Не удалось установить python3.12 из $PY_DEB. Проверьте зависимости пакета." >&2
fi
fi
if [ -n "$PY_VENV_DEB" ]; then
echo "python3.12-venv не найден в системе. Устанавливаю из $PY_VENV_DEB ..."
if dpkg -i "$PY_VENV_DEB"; then
echo "python3.12-venv успешно установлен из vendor/debs."
else
echo "Не удалось установить python3.12-venv из $PY_VENV_DEB. Проверьте зависимости пакета." >&2
fi
fi
if command -v python3.12 >/dev/null 2>&1; then
NEED_PYTHON=0
fi
fi
if [ "$NEED_XVFB" -eq 1 ]; then
XVFB_DEB="$(ls "$REPO_ROOT"/vendor/debs/xvfb_*.deb 2>/dev/null | head -n1 || true)"
if [ -n "$XVFB_DEB" ]; then