fix: pip install all modules (no -e), remove PYTHONPATH from start.sh

This commit is contained in:
yumoqing 2026-08-11 17:50:09 +08:00
parent dd8a1c3d3e
commit 62662f0477
2 changed files with 8 additions and 4 deletions

View File

@ -97,11 +97,17 @@ green " OK"
blue "[4/10] 安装模块..." blue "[4/10] 安装模块..."
MODULES=(apppublic sqlor ahserver appbase rbac MODULES=(apppublic sqlor ahserver appbase rbac
pcpool pcc storage_mgr image_mgr) pcpool pcc storage_mgr image_mgr)
_pip_failed=0
for m in "${MODULES[@]}"; do for m in "${MODULES[@]}"; do
mp="${PKGDIR}/${m}" mp="${PKGDIR}/${m}"
[ -f "${mp}/setup.py" ] || [ -f "${mp}/setup.cfg" ] || [ -f "${mp}/pyproject.toml" ] || continue [ -f "${mp}/setup.py" ] || [ -f "${mp}/setup.cfg" ] || [ -f "${mp}/pyproject.toml" ] || continue
"${PIP}" install -e "${mp}" -q 2>&1 | tail -1 echo " pip install ${m}..."
"${PIP}" install "${mp}" -q 2>&1 && echo " OK" || { red " FAILED: ${m}"; _pip_failed=1; }
done done
if [ $_pip_failed -eq 1 ]; then
red " Some modules failed to install"
fi
green " OK" green " OK"
# ============================================================ # ============================================================
@ -229,7 +235,6 @@ cat > "${CDIR}/start.sh" <<SHEOF
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
cd "${CDIR}" cd "${CDIR}"
export PYTHONPATH="${PKGDIR}/ahserver:${PKGDIR}/apppublic:${PKGDIR}/sqlor:${PKGDIR}/appbase:${PKGDIR}/rbac:${PKGDIR}/bricks_for_python:\$PYTHONPATH"
exec "${VENV}/bin/python" "${CDIR}/app/pccs.py" exec "${VENV}/bin/python" "${CDIR}/app/pccs.py"
SHEOF SHEOF
chmod +x "${CDIR}/start.sh" chmod +x "${CDIR}/start.sh"

View File

@ -38,8 +38,7 @@
"indexes": ["index.ui", "index.html"], "indexes": ["index.ui", "index.html"],
"statics": [ "statics": [
["/bricks/", "/d/pccs/wwwroot/bricks/"], ["/bricks/", "/d/pccs/wwwroot/bricks/"],
["/imgs/", "/d/pccs/wwwroot/imgs/"], ["/imgs/", "/d/pccs/wwwroot/imgs/"]
["/", "/d/pccs/wwwroot/"]
] ]
} }
} }