From a46e43b73cf06328429abb57c94c1e856e09acd2 Mon Sep 17 00:00:00 2001 From: lou Date: Mon, 10 Aug 2026 22:29:52 +0800 Subject: [PATCH] =?UTF-8?q?postinst:=20=E7=B3=BB=E7=BB=9F=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=8A=A0=20python3-venv=20+=20pip=20=E6=B8=85?= =?UTF-8?q?=E5=8D=8E=E9=95=9C=E5=83=8F=E5=9B=9E=E9=80=80=20(dpkg=20-i=20?= =?UTF-8?q?=E7=9B=B4=E8=A3=85=E4=B9=9F=E8=83=BD=E8=87=AA=E5=8A=A8=E8=A3=85?= =?UTF-8?q?=E9=BD=90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/postinst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/postinst b/debian/postinst index 26f68c8..52d967b 100755 --- a/debian/postinst +++ b/debian/postinst @@ -3,14 +3,15 @@ set -e case "$1" in configure) - echo "正在安装系统依赖 (aria2 + p7zip-full) ..." - apt-get install -y aria2 p7zip-full >/dev/null 2>&1 || true + echo "正在安装系统依赖 (aria2 + p7zip-full + python3-venv) ..." + apt-get install -y aria2 p7zip-full python3-venv >/dev/null 2>&1 || true P=/usr/share/7z-encrypt/.venv if [ ! -x "$P/bin/python" ]; then echo "正在创建 7z-encrypt 运行环境 (venv + cryptography/tqdm) ..." python3 -m venv "$P" "$P/bin/pip" install --quiet --upgrade pip || true - "$P/bin/pip" install --quiet cryptography tqdm + "$P/bin/pip" install --quiet cryptography tqdm \ + || "$P/bin/pip" install --quiet -i https://pypi.tuna.tsinghua.edu.cn/simple cryptography tqdm fi ;; esac